jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Franck POCHET <franck_poc...@yahoo.com>
Subject PROPOSAL : a sort taglib
Date Wed, 02 Jul 2003 07:18:17 GMT
Hello all,

Suppose you have an AddressBook value object that have
the following properties:
- lastname
- firstname
- town
- phone
This VO of course, implement Comparable interface for
a natural order, don't care about which one.
When you diplay a list of address, generally you let
the end-user to sort the list on any column.
The taglib I created permit you to do that in this way
<sort:sort name="beanList" attribute="getList"
scope="theScope" field="propertyShouldSort"/>
Eg. we have on session a bean "addressList", to sort
it by phone ascending just do:
<sort:sort name="addressList" scope="session"
For sorting it by town descending :
<sort:sort name="addressList" scope="session"
field="town" order="desc">
This tag permit you also to sort your list on several
columns, for sorting the list by town and by phone
(ORDER BY town, phone) :
<sort:sort name="addressList" scope="session"
<sort:resort name="addressList" scope="session"
basefield="town" field="phone">

Tell me how to send you this taglib if your are

Best Regards


Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

To unsubscribe, e-mail: taglibs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-dev-help@jakarta.apache.org

View raw message