RE: Sling Models: ResourcePath annotation with relative path support?

2016-04-20 Thread Stefan Seifert
@ResourcePath injects the resource path (string), not a resource identified by a path. please try the @ChildResource injector with name = child path. https://sling.apache.org/documentation/bundles/models.html#available-injectors stefan >-Original Message- >From: olimination

Sling Models: ResourcePath annotation with relative path support?

2016-04-20 Thread olimination
Hi, I'm using Sling Models (cool stuff, thanks for that!) and would like to get a resource relative to the current rendered resource. Actually I want to get an InputStream from a nt:file node and so I thought to make this with the ResourcePath annotation with a relative path. Something like:

Re: [import] how to POST ordered structures

2016-04-20 Thread Nicolas Peltier
> > OOTB yes, the alternative being to extend the POST servlet to do what > you need, as it's generally useful. right, how would you see it? custom key value like “slingpost_order”:[“child1”,”child2”,”child3”] ? > > -Bertrand

Re: [import] how to POST ordered structures

2016-04-20 Thread Bertrand Delacretaz
Hi Nicolas, On Wed, Apr 20, 2016 at 11:11 AM, Nicolas Peltier wrote: > ...so to me ootb i have 2 choices... OOTB yes, the alternative being to extend the POST servlet to do what you need, as it's generally useful. -Bertrand

Re: [import] how to POST ordered structures

2016-04-20 Thread Nicolas Peltier
Hi, i don’t see how with current api [0] i could inject an array for child nodes (would miss the child node name, and the parent type) so to me ootb i have 2 choices (not sure of the one i dislike the most): - xml import as i’m already using json in my client jar, so adding another lib just for

Re: [import] how to POST ordered structures

2016-04-20 Thread Bertrand Delacretaz
Hi, On Tue, Apr 19, 2016 at 6:11 PM, Nicolas Peltier wrote: > json objects’ key values are not ordered, so does that mean there is no choice > but to use xml to POST ordered structure?... Could you use arrays instead of objects in your POST requests to keep ordering? I

Re: [import] how to POST ordered structures

2016-04-20 Thread Nicolas Peltier
xml hurts, would it be acceptable to have a “internal” key in object that specifies the order? > On 19 Apr 2016, at 18:11, Nicolas Peltier wrote: > > Hi, > > json objects’ key values are not ordered, so does that mean there is no > choice but to use xml to POST ordered