The <html:option> tag already has this facility - you can specify a "key" attribute.
If however you want yo use the <html:optionsCollection> tag, there was an identical discussion on this list recently. You can find the start of that thread here.. http://www.mail-archive.com/[EMAIL PROTECTED]/msg93939.html Niall ----- Original Message ----- From: "Keith Hyland" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Monday, March 08, 2004 4:10 PM Subject: internationalizing html:option tag, force to lookup resource file > Hi, > > Sorry if this is a repeat post, but I don't think the original went through. > > I'm just starting into looking at struts. > > Is it possible to generate a select/ options list using the html:select > and html:option(s) tags, where the labelProperties (i.e. the text > displayed on the end users web browser) get looked up from a resource > file, instead of been displayed directly. > > e.g. > > if we have a collection bean made up of 3 namevalue pairs {(1,one), > (2,two), (3,three)} > > <html:select property="partnerId"> > <html:options collection="list.bean" property="name" > labelProperty="value"/> > </html:select> > > produces > > <select> > <option value="1">one</option> > <option value="2">two</option> > <option value="3">three</option> > </select> > > This produces a select box with the English values appearing on the web > page regardless of the locale that is set. > > What I want is for the one, two and three to be keys into the > applicationResources.properties so that different locales can be setup. > > If this is not available would it be useful to write a tag to do this? > > Cheers, > Keith > > > --------------------------------------------------------------------- > 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]