This code is working : <s:select list="@org.ensam.annuaire.enumeration.Localization@values()" />
This one is not working : <s:select list="@org.ensam.annuaire.enumeration.Localization@ getListLocalization ()" /> Neither this one : <s:select list="@org.ensam.annuaire.enumeration.Localization@ listLocalization ()" /> And neither this one : <s:select list="@org.ensam.annuaire.enumeration.Localization@ listLocalization " /> I would be great to make the getListLocalization() work because I will be able to have a nice display of select element. Thank Matthieu MARC -----Message d'origine----- De : Steven Yang [mailto:kenshin...@gmail.com] Envoyé : jeudi 12 mai 2011 12:34 À : Struts Users Mailing List Objet : Re: Iterator tag and enumeration try <s:select list="@{full package name}.Localization@values()"/> On Thu, May 12, 2011 at 3:33 PM, <matthieu.m...@ensam.eu> wrote: > Hi, > > I have an enumeration 'Localization' : > > public enum Localization { > > AIX("Aix-en-provence"), > ANGERS("Angers") ; > } > > And I want to put a form select in a jsp using s:select tag with all > Localization items, like : > > <s:select list="Localization enum"/> > > But I don't know what to put in the list parameter. > > In my Localization enum, I wrote a function to retrieve Localization > item through a sorted map : > > public Map<String, String> getListLocalization() { > [...] > } > > So that my select will be like : <option > value="aix">Aix-en-provence</option> > > My question is finally : how to put an enumeration in a s:select tag ? > > Thanks, > > Matthieu MARC > > --- > Matthieu MARC > Responsable du Service Informatique du Centre d'Angers Arts et Métiers > ParisTech Tél : 02 41 20 73 61 > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org