struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "fea jabi" <zy...@hotmail.com>
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 
by.

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.

Thanks.

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message