[ 
https://issues.apache.org/jira/browse/SLING-535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12682469#action_12682469
 ] 

Andreas Hartmann commented on SLING-535:
----------------------------------------

I have the feeling that utilizing the JsonRestStore might not be as easy as I 
hoped.

The GET servlet I implemented is based on selectors. Reading seems to work fine 
with this approach. But when I try to write, the not strictly hierarchical URI 
schema causes trouble. The JsonRestStore seems to rely on a URI schema like 
this:

/service/
/service/path/to/node

Strangely, the first path snippet is used to identify the service and therefore 
the store for an item:

dojox.data._getStoreForItem = function(item){
   return dojox.rpc.JsonRest.services[item.__id.match(/.*\//)[0]]._store;
};

Is it possible to use sling.servlet.prefix to "mount" the REST service at a 
different path than the actual location in the resource tree? This way I could 
get rid of the selectors and maybe create a truly hierarchical structure ...

> Align Node and Property Stores with Dojo's upcoming JsonRestStore
> -----------------------------------------------------------------
>
>                 Key: SLING-535
>                 URL: https://issues.apache.org/jira/browse/SLING-535
>             Project: Sling
>          Issue Type: Improvement
>          Components: Extensions
>            Reporter: Lars Trieloff
>            Assignee: Lars Trieloff
>            Priority: Minor
>
> Dojo 1.2 will include (aside from widget beautification) a JsonRestStore that 
> works very closely to what we already have in the dojo extensions, but it 
> provides some additional features like object synchronization (which is good 
> performance-wise if you are doing many reads on a node) and integration with 
> Google Gears for offline support.
> Thanks to Michael Marth for spotting this and please assign this issue to me 
> if possible.
> http://www.sitepen.com/blog/2008/06/13/restful-json-dojo-data/

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to