• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

I18N for Action

 
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello
I am using this to populate and check my radio button. However I dont see how to I18N the text b/c I am building it in the execute method. Also is there catch-22 here b/c I would not want to I18N the value on the radio input object, just the label, or in this case "one-half" of the LabelValueBean? (Yes, I know how brutal that concept is). In short how would one I18N the very elegant approach but still keep the value English? tia.
 
Chris Pat
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello
Actually I was able to see better how to do this. This is the standard block
<logic:iterate id="row" name="booleanLvb">
<html:radio property="optionOne" value="value" idName="row"/>
<!--bean:write name="row" property="label"/><br/-->
<bean:message name="row" property="label"/>
</logic:iterate></td>
Where booleanLvb is a ArrayList of LabelValueBean, and optionOne is the default choice set in the formbean. This works perfectly using the <bean:write .../>, how it is not I18N. The docs say that bean:message can do the I18N localized lookup with either the key attribute or the name & property attribute. It does not work. I set it so the label portion of my individual boolean Lvb were the actual keys in my ApplicationResources and the value was the non-I18N English value. This should work exactly how I want, but doesnt as all it renders is the key value i.e. global00.true not the bean:message I18N processed English value of True. Can this be done? tia.
 
Chris Pat
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello
Sorry for being persistent, or worse grin. However elucidating how to do this, I believe, would be a contribution. I need to have the label part I18N and the value the English so I can do the program control flow. bean:message using name and property does not work as expected but should work perfectly for the total intent. Should I use html:messages and would I still be able to "split" the rendering of label as I18N and the value as English? tia.
 
No matter. Try again. Fail again. Fail better. This time, do it with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic