You can use http://java.sun.com/j2se/1.4.2/docs/api/java/util/Collections.html#reverse(java.util.List)

public void pageBeginRender() {
   setInvertedCollection(Collections.reverse(mylist));
}

public abstract void setInvertedCollection(List list);
public abstract List getInvertedCollection();





Inge Solvoll wrote:
No problem, just invert the source collection.

create a getter method in your java page class (getInvertedCollection())
that reads the first collection and sorts it the way you want, then point
the source-attribute of the for-component to the new method

<span jwcid="@For" source="invertedCollection">

On 2/14/06, Jean-Eric Cuendet (JeSC) <[EMAIL PROTECTED]> wrote:
Hi,
I would like to display a List with a @For component. Is it possible to
reverse iterate on it?
Going from index size()-1 to 0?
Thanks
-jec


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to