You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ken'ichi Unnai <ke...@yahoo.com> on 2001/09/24 16:39:37 UTC

true_i18n_value ?

Hi All, 

I'm building a small select.jsp -> ReceiveServlet -> result.jsp
test webapp.

As I went further, I found I have one problem for select option
value for foreign chars.

in select.jsp:
-----------------------------------------------------
  <html:form action="/select">
   <html:select property="color">
    <html:option value="?jpLangValueForWhite?" key="option1"/>
    <html:option value="?jpLangValueForBlue?" key="option2"/>
    <html:option value="?jpLangValueForGray?" key="option3"/>
   </html:select>
   <html:submit><bean:message key="submit"/></html:submit>
  </html:form> 
-----------------------------------------------------

What I want to do is avoid hardcoding the value of each option...
One thing that seems odd to me is why html:option has separate 
value & option attributes. I would appreciate if 

    <html:option value="white">
     <bean:message key="option1"/>
    </html:option> 

Then the value is overriden and it become the one from 
MessageResource property (in this example, "option1" value) ...

There maybe some workaround if I use "options" tag but
that requires for Actin bean to have hardcoded array values.

Could anyone please point me out how to do it, making use of
MessageResource property without hardcoding Action bean?


Many thanks,
Ken




__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com