You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by Actiecomite voor een leefbaar Tienen <we...@gmail.com> on 2012/04/16 11:07:41 UTC

same name sibblings

All,

I wonder if same name sibblings are supported yet in the REST api? I do
know they were not supported back in 2010. Now I wonder if anything has
changed:

http://apache-sling.73963.n3.nabble.com/Adding-Multiple-Nodes-with-the-Same-Name-to-the-Same-Parent-td205889.html


The reason to use same name sibblings, is that I want to auto convert them
(based on JAX-RS) to a java class containing a list of sibblings.. From a
JCR perspective, it's probably more flexible to give your sibblings any
name you like, but in the java world you cannot have a class with dynamic
properties... Additional info: from my project's point of view, Sling is
just a REST wrapper around jackrabbit. I do not need all the scripting
capabilities of Sling.

JSON:

{"jcr:primaryType":"my:parent",

 "one":{"prop1":"mynameisone","prop2":33, "jcr:primaryType":"my:child"},

 "two":{"prop1":"mynameistwo","prop2":44, "jcr:primaryType":"my:child"}

}

Define a class in java this is not possible...

class MyParent {

}