Sorted Node Factory [message #1388431] |
Thu, 26 June 2014 12:41 |
Hazem ELRAFFIEE Messages: 61 Registered: September 2012 |
Member |
|
|
Hello
Let's say I have the following XML:
<salaries>
<employee name="name1" salary="1000" />
<employee name="name2" salary="2000" />
<employee name="name3" salary="4000" />
<employee name="name4" salary="2500" />
<employee name="name5" salary="1500" />
<employee name="name6" salary="1100" />
<employee name="name7" salary="2300" />
</salaries>
Normally I would create a Node Factory for that like this:
<node-factory>
<property>Employees</property>
<case>
<section>
<content>
<property-editor>Name</property-editor>
<property-editor>Salary</property-editor>
</content>
</section>
<label>${ Name == null ? "UnNamed" : Name }</label>
</case>
</node-factory>
But then the employees will be viewed with the order they are in the XML. What if I want them to be viewed sorted by salary for example? or by name?
Note: I use Sapphire 0.7.2
[Updated on: Thu, 26 June 2014 12:44] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04340 seconds