You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mishkin Berteig <mi...@berteig.com> on 2001/01/28 23:00:45 UTC
I18N and forms
I have been working on internationalizing my struts app. I just noticed
that the form:submit tags' label is the value used for the property when
submitted. If I understand correctly, this means that I can't use a
bean:message tag to set the label, and a separate constant value for the
property value on submission, which of course means that if I want my
buttons to localize properly, I need really ugly handling code in my
action classes.. Is there something I am missing? Or does anyone have
a good way of working around this?
Thanks,
Mishkin.
Re: I18N and forms
Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Mishkin Berteig wrote:
> I have been working on internationalizing my struts app. I just noticed
> that the form:submit tags' label is the value used for the property when
> submitted. If I understand correctly, this means that I can't use a
> bean:message tag to set the label, and a separate constant value for the
> property value on submission, which of course means that if I want my
> buttons to localize properly, I need really ugly handling code in my
> action classes.. Is there something I am missing? Or does anyone have
> a good way of working around this?
>
If you specify nested content inside the <html:submit> tag, it will be used
as the button label. For example, the "registration.jsp" page in the
example app does this:
<html:submit>
<bean:message key="button.save"/>
</html:submit>
>
> Thanks,
> Mishkin.
Craig McClanahan