> -----Original Message-----
> From: Craig Dickson [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 08, 2004 9:51 AM
> To: Struts List
> Subject: [OT] How to sort with <c:forEach>?
> 
> 
> Hi,
> 
> Is there an easy way to have the JSTL forEach tag sort the 
> collection of
> items before looping through them? Currently I have a 
> scriptlet doing it
> before the loop tag, but this is pretty ugly.

If you use some of the jakarta commons collection stuff you could call a setter and 
have the collection auto-sort.  I'm assuming your talking about allowing dynamic 
resort of a table by column, as opposed to not doing it coming out of the database.


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

Reply via email to