deja vu, see my comment on the ticket that you opened: https://issues.apache.org/struts/browse/WW-2763
musachy On Sun, Jan 4, 2009 at 2:49 PM, Stephan Schröder <simon.v...@gmx.de> wrote: > > i have a checkboxlist which entries are derived from possible values of an > enum (named TrainingAttribute). > > This usage of the checkboxlist works > <@s.checkboxlist label="Attribute" name="trainingAttributes" > list="@domainobjects.util.trainingattrib...@values()}"/> > > "trainingAttributes" gives an array of type TrainingAttribute with a subset > of TrainingAttribute.values(). > Of course this displays the Java-Names of the enum-Instances therefore i > added the two methods for the key and the name: > public enum TrainingAttribute > { > ADVANCED,BEGINNER,CHILDREN,WEAPON; > > public String getKey() > { > return toString(); > } > > public String getName() > { > switch( this ) { > case ADVANCED: return "Fortgeschrittene"; > case BEGINNER: return "Anfänger"; > case CHILDREN: return "Kinder"; > case WEAPON: return "Waffen"; > } > throw new RuntimeException( "unknown enum:"+getClass().getName() ); > } > } > > Now i added the listValue- and listKey-parameter: > <@s.checkboxlist label="Attribute" name="trainingAttributes" > list="%...@domainobjects.util.trainingattribute@values()}" listValue="name" > listKey="key"/> > > but no checkbox is checked. Using @s.select with the multiple=true option > doesn't prepopulate either. > So what's the right way to write and use a localised enum set in a > checkboxlist? > > /Stephan > -- > View this message in context: > http://www.nabble.com/How-to-use-a-localised-enum-in-a-checkboxlist-tp21280363p21280363.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- "Hey you! Would you help me to carry the stone?" Pink Floyd --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org