struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "fea jabi" <>
Subject using Comparable interface for list in Displaytag
Date Wed, 09 Nov 2005 14:21:08 GMT
for sorting the data in the list in the auto-sorting there is a statement

If you want to allow the user to sort the data as it is coming back, then 
you need to just do two things, make sure that the data returned from your 
property implements the Comparable interface (if it doesn't natively - use 
the decorator pattern as shown a couple of examples ago), and then set the 
attribute sortable="true" on the columns that you want to be able to sort 

How to do this i.e using of Comaparable interface?
The list I used is of type Form1 which has attribites
name - String
type - String
status - String
date - Date

My list is an ArrayList of type Form1 which I am trying to display in the 
JSP tabe using display tag.


Express yourself instantly with MSN Messenger! Download today - it's FREE!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message