aspose file tools*
The moose likes Struts and the fly likes I18N for Action Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "I18N for Action" Watch "I18N for Action" New topic
Author

I18N for Action

Chris Pat
Ranch Hand

Joined: Aug 27, 2005
Posts: 156
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

Joined: Aug 27, 2005
Posts: 156
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

Joined: Aug 27, 2005
Posts: 156
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.
 
 
subject: I18N for Action