Re: How sort the collection of MenuComponent returned by getTopMenus() of MenuRepository?

Matt Raible <[email protected]>
Newsgroups gmane.comp.java.struts-menu.user
Message-ID <[email protected]>
Currently, the list of menus is stored in a hashmap, so the order is not
guaranteed.  There have been some patches and suggestions for fixes
submitted, but I haven't committed them yet.  You could download the source
and change it yourself - possibly changing from a hashmap to a
LinkedHashMap:

http://java.sun.com/j2se/1.4.2/docs/api/java/util/LinkedHashMap.html

Matt

On 12/9/05, Damien GUERIN <[email protected]> wrote:
>
> Hi,
>
> in my menu-config.xml file, i've got some menus but these menus aren't
> known. So in my jsp, i use the following code:
> <menu-el:useMenuDisplayer name="CoolMenu">
> <c:forEach var="menu" items="${repository.topMenus}">
>         <menu-el:displayMenu name="${menu.name}"/>
> </c:forEach>
> </menu-el:useMenuDisplayer>
>
> However, i noticed, this collection aren't sorted... How sort it by name
> (for example).
>
> I hnow it's possible by java code in my jsp but this solution is rather
> bad for me. I tried to find a taglib to sort collection but for the
> moment i didn't find a taglib with an good license (for me). I want
> avoid GPL license.
>
> Any idea?
>
> Thanks.
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> struts-menu-user mailing list
> struts-menu-user-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/struts-menu-user
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.