struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Al Sutton" ...@al-and-andrea.org.uk>
Subject RE: sort entries by the selected tag
Date Mon, 11 Jun 2007 07:42:29 GMT
I've always put sorting as part of the action by determining the sort order
creating an appropriate Comparator implementation and using it in the
constructor for the TreeMap.

I've done this because imho your view should just be about presentation, and
the logic for determining and implementing your sort should be in your
action.

-----Original Message-----
From: Anton Pussep [mailto:anton@pussep.de] 
Sent: 10 June 2007 21:46
To: Struts Users Mailing List
Subject: sort entries by the selected tag

Hello,

I would like to sort the menu created by the selected tag. So far I just
pass a TreeMap where the entries are sorted already. However, I think that
the View should decide whether to sort or not to sort, but I could not find
a way to force the selected tag to sort. Is there anything you can
recommend?

<s:form action="DeleteUser">
    <s:select
        list="idToNameMapping"
        name="userId"
        emptyOption="false" />
    <s:submit />
</s:form>

Thanks and best regards,
Anton



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


Mime
View raw message