cancel
Showing results for 
Search instead for 
Did you mean: 

Table Sorting

Former Member
0 Kudos

Hi All,

Is there a way to sort a table by two columns?

I don't need sorting actions on the table hedaers or a single column sort, which TableSorter enables.

I will give an example:

Table before sorting

A U 200

B H 100

A I 300

B A 400

Table after sorting

A I 300

A U 200

B A 400

B H 100

Thanks,

Aviad

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

Hi Aviad,

Check

Especially general helper class from Valery: sorting by mulyiple attributes


node.sortElemenst(   new GenericNodeElementComparator  (    new OrderingExpression().desc("Salary").asc("Name")  ));

Best regards, Maksim Rashchynski.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

It depends where your data is coming from...

If you are getting the data from a backend SAP system for instance via RFC it is very easy for the data to be sorted before it is returned.

If you are building up the data in purely Java then you will need to write a sorting routine - search on Google for help on this as I'm sure its been done hundreds of times before!

Hope this helps,

Gareth.