I am trying to get the value property of html:radio from message resource and it does not work. It displays the bean:message as string rather than retrieve the value for the provided key.
how to get the corresponding message resource value?
value="<bean:message key='disp.pr.1' bundle = 'dispmessage'>" [ February 25, 2007: Message edited by: shah rah ]
posted 8 years ago
It's generally not a good idea to attach a message resource key to the value of a radio button. The reason for this is that if you do so the value could change depending on the language used. Since you use that value to mean something in your program or your database, having it change depending on the language is usually a bad thing. It's fine for the label to change based on the language, but the value shouldn't change.
This is one of the reasons Struts has not provided an easy or convenient means of doing this. Embedding one Struts tag as an attribute of another is not supported, so the method you're trying simply won't work. Here's one way to do it, though:
[ February 26, 2007: Message edited by: Merrill Higginson ]