cancel
Showing results for 
Search instead for 
Did you mean: 

Maintain order of properties as defined in the model

deepacp
Champ in-the-making
Champ in-the-making
Hi,

When I retrieve the properties defined for a particular content type as well as for a given node, its order is getting changed. I would like to retain the order as defined in the model file. Some of these properties are part of mandatory aspects.

Code snippet given below

   Map<QName, PropertyDefinition> aspectPropDefs = dictionaryService.getAspect(aspect).getProperties();

Given a noderef, I retrieve the properties as given below

        Map<QName, Serializable> propertyMap = nodeService.getProperties(noderef);

In both cases, the order is changed. Since I am using a custom webservice to return the properties to a third party application, I need to retain the order as defined. Any help in this regard would be great.

Thanks
Dee[a

2 REPLIES 2

mrogers
Star Contributor
Star Contributor
Unless its documented, there is no specified order for properties so if you need a particular order then you will need to implement your own sort.

deepacp
Champ in-the-making
Champ in-the-making
Thanks a lot! I didn't quite get what you meant by "unless it is documented".