What all node types support child node ordering in aem?

Avatar

Avatar

Rashid_Jorvee

Avatar

Rashid_Jorvee

Rashid_Jorvee

15-07-2018

Hi Guys,

What all NodeType supports child node ordering, so I can use Node.orderBefore() method on that? Is there any way to make any Node type orderable?

Thanks!

Rashid Jorvee

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831
Arun_Patidar
MVP

16-07-2018

Hi,

The orderable child nodes setting is defined per node type. Whether the child nodes of a node N are orderable depends on the node type of N.

A repository supports orderable child nodes by permitting the registration of node types with an orderable child node setting of true.

When a node does not support orderable child nodes this means that it is left up to the implementation to maintain the order of child nodes. Applications should not, in this case, depend on the order of child nodes returned by Node.getNodes, as it may change at any time. The only exception to this rule is that same-name siblings must maintain their relative order across read method invocations and across sessions.

Please check

JCR 2.0: 23 Orderable Child Nodes (Content Repository for Java Technology API v2.0)

JCR 1.0: 4.4.2 Non-orderable Child Nodes (Content Repository for Java Technology API)

Custom Node Types

Thanks

Arun

Answers (1)

Answers (1)

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

16-07-2018

Great answer!