Child node order preserved

3 views
Skip to first unread message

Nicolas

unread,
Sep 10, 2009, 6:35:02 AM9/10/09
to jcrom
Hi guys,

I am pretty new to jcrom and need some help.

I have a node (unstructured & versionable) defined with
hasOrderableChildNodes="true".
In the corresponding java class I've mapped a collection of the same
type like this:

@JcrNode(nodeType="xxx:courseNode")
public class CourseNode extends ContentEntity{
...
protected @JcrChildNode List<CourseNode> children = new
ArrayList<CourseNode>();
...

I try to re-order / insert child nodes at a certain place in the list
and hope that when saving the parent the list order was respected but
when I retrieve the children the newly inserted child (inserted in the
middle) is at the end of the collection.

What should I do to have the order of the list respected when saving ?

thanks in advance

Nicolas

unread,
Sep 10, 2009, 6:37:37 AM9/10/09
to jcrom
Edit: sorry if you receive this twice I did a repost with [jcrom]
added in the sublect to avoid spam filter problems
Reply all
Reply to author
Forward
0 new messages