struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glanville, Jay" <Jay.Glanvi...@NaturalConvergence.com>
Subject can I use resource keys in html:optionsCollection?
Date Wed, 18 Feb 2004 14:06:19 GMT
I've looked in the documentation and I can't find my answer, so I'm
assuming that the answer is "no".  However, I'm posing the question to
this list in case I've missed something.

I'm using an <html:optionsCollection> tag to display a list of options
inside my <html:select> tag.  However, I want the labels not to be
directly populated from collection.label, but from my resource bundle
through keys.  In other words, I don't want my collection to be a set of
label - value pairs, but to be a set of label key - value pairs.

Is there a way to have optionsCollection use label keys as opposed to
labels?

I've thought of two ways that I can work around this limitation, but I'd
prefer to use the simpler html:optionsCollection method.  My workarounds
are:
1) to use <logic:iterate> to iterate over the collection, and then use
individual <html:option> tags using the key attribute.
2) when creating my collection, resolve my bundle key into a bundle
value for the collection's value attribute.

So, suggestions? Feedback? Help?

Thanks

JDG

--
Jay Glanville

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


Mime
View raw message