Sam wrote:
> Any clues on best easy ways to do table column sorting
> my rows in the table are generated as follows using 
> <logic:iterate> as below.

I do it on the server side, holding the items to be sorted in a Map and
creating a new Map passing a Comparator to the constructor to get the
new order.  Then when you're back on the JSP iterating over it, the
items are in the "correct" order.

Map accountMap = (Map) session.getAttribute( "accountMap" );
Map newMap = new TreeMap( new CostCenterComparator() );
newMap.putAll( accountMap );
session.setAttribute( "accountMap", newMap );

[Comments welcome, I'm not sure this is the best way to do it, but it
works...]

What type of Collection is 'books' in your example?
 
-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to