cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Ratcliffe" <a...@mrigitech.com>
Subject RE: Sorting elements before jx:forEach ?
Date Sun, 12 Dec 2004 22:59:38 GMT
Hi Laurent

You can use the java.util.Collections class to sort a list using either the
natural ordering of the elements or by supplying a Comparator.  You just
need to import these classes into your flowscript to use them.

Cheers
Adam

-----Original Message-----
From: Laurent Perez [mailto:hakimm@gmail.com]
Sent: Friday, 10 December 2004 9:02 a.m.
To: users@cocoon.apache.org
Subject: Sorting elements before jx:forEach ?


Hello

Is it possible to directly sort elements (say, by some random bean
property) within the JXTemplate itself before looping over an
ArrayList received from a flowscript with <jx:forEach>, or is the best
practice to sort them before they reach the JXTemplate ? And if so,
how would you sort them within a flowscript ?

Thanks for any advice


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message