tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oded Arbel <o...@m-wise.com>
Subject Re: xtags:forEach - integer sorting
Date Tue, 11 Oct 2005 08:05:20 GMT
On Tuesday, 11 בOctober 2005 09:56, LANTRES Franck wrote:
> Hi,
>
> In a JSP, I use the xtags:forEach element and I would like to sort
> elements in descending order according to an integer value.

> And if I write :
> <xtags:forEach select="/foo/list" sort="value" ascending="false"/>
>
> The result I get is :
> 6
> 56
> 4
> 2

Which is reasonable, as forEach does string sorting. You might want to 
either pad numbers with zeros or white space, or sort them yourself 
somehow.

-- 
Oded Arbel
m-Wise mobile solutions
oded@m-wise.com

+972-9-9611212 (204)
+972-54-7340014

::..
Never express yourself more clearly than you think. 
	-- N. Bohr

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


Mime
View raw message