Sorting in CQ5 Dialog SelectBox Dropdown | Community
Skip to main content
Level 3
October 16, 2015
Solved

Sorting in CQ5 Dialog SelectBox Dropdown

  • October 16, 2015
  • 1 reply
  • 2088 views

Hi All,

We are displaying list of IDs for example 3111111,3333333,3222222,21111111... etc in an dropdown of CQ5 dialog where author choose one and enter content so that the content will be persisted with ID in the jcr content.

The issues is how to sort the numbers and display them in ASC/Desc order. I tried with sortDir property of Xtype select and it not sorting the above string values.when i research i found the property will be used to sort only characters.

how to sort the above kind of values. the dropdown is huge and it is hectic for author to choose the ID from the drop down.

Please suggest the way to handle this 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008
        Write a custom xtype that works with the data. Order the data in an event handler method in the script and then set the data in the drop down. We have a community article that shows how to dynamically work with data in a custom xtype: http://helpx.adobe.com/experience-manager/using/dynamically-updating-aem-custom-xtype.html

1 reply

smacdonald2008
smacdonald2008Accepted solution
Level 10
October 16, 2015
        Write a custom xtype that works with the data. Order the data in an event handler method in the script and then set the data in the drop down. We have a community article that shows how to dynamically work with data in a custom xtype: http://helpx.adobe.com/experience-manager/using/dynamically-updating-aem-custom-xtype.html