jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tobr...@transolutions.net (O'brien, Tim)
Subject RE: A simple sort tag
Date Mon, 03 Feb 2003 19:27:32 GMT
Also, does anyone have any suggestions for providing EL support.  Most of
that SortTag class is devoted to EL evaluation.  

--------
Tim O'Brien 

> -----Original Message-----
> From: O'brien, Tim [mailto:tobrien@transolutions.net] 
> Sent: Monday, February 03, 2003 1:23 PM
> To: 'Tag Libraries Developers List'
> Subject: A simple sort tag
> 
> 
> I frequently do this:
> 
>   <myapp:planet type="gaseous-giant">
>    <collection:sort items="${planets}" 
> property="distanceFromSun" order="ascending">
>     <c:forEach var="planet" items="${planets}">
>      Humans will soon fly through <c:out 
> value="${planet.name}"/>'s atmosphere<br/>
>     </c:forEach>
>    </collection:sort>
>   <myapp:planet>
> 
> I didn't see anything like this on Jakarta Taglibs, and 
> commons-collections, commons-beanutils (esp. BeanComparator) 
> make this trivial. Forgive me if this is already a part of Taglibs.  
> 
> Here's the tag: http://cvs.apache.org/~tobrien/SortTag.java 
> and here's the TLD: http://cvs.apache.org/~tobrien/collection.tld
> 
> I also see opportunity for a randomizer tag to take a 
> collection and scramble it.  This would be useful for lists 
> of mirrors.
> 
> --------
> Tim O'Brien 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-dev-help@jakarta.apache.org
> 
> 


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


Mime
View raw message