1. I'm new to Struts and am trying to do something that seems should be quite straight-forward but isn't. I'm developing a wizard with navigation buttons as follows (I'm only including two of the buttons for simplicity):
<html:submit property="submit"><bean:message key="button.previous"/></html:submit>
<html:submit property="submit"><bean:message key="button.next"/></html:submit>
In struts-config.xml I've setup the following mapping to support this navigation for each action (I'm using MappingDispatchAction):
<forward name="Previous" path="/defineRoute.jsp"/>
<forward name="Next" path="/defineAlert.jsp"/>
In my defined MappingDispatchAction methods, I return the following based on the submit button that was selected to traverse to the appropriate page:
return mapping.findForward(form.getSubmit());
All is great, but this will break once I localize the buttons because the <html:submit> tag doesn't seem to allow the separation of logical and display values. I would like my references in my struts-config.xml file to be "logical" values and to specify the buttons in my JSP as follows (notice the addition of the value attribute):
<html:submit property="submit" value="Previous"><bean:message key="button.previous"/></html:submit>
<html:submit property="submit" value="Next"><bean:message key="button.next"/></html:submit>
My hope was that the above would render resource bundle text to the screen while delivering the logic "value" to the ActionForm in getSubmit().
The reality is that "value" attribute seems to override the <bean:message> is the HTML output so I don't get localized text in the submit buttons.. Is this a bug in the Struts html submit tag?
Thanks in advance.
Jeff Small
jsmall@kivera.com
<html:submit property="submit"><bean:message key="button.previous"/></html:submit>
<html:submit property="submit"><bean:message key="button.next"/></html:submit>
In struts-config.xml I've setup the following mapping to support this navigation for each action (I'm using MappingDispatchAction):
<forward name="Previous" path="/defineRoute.jsp"/>
<forward name="Next" path="/defineAlert.jsp"/>
In my defined MappingDispatchAction methods, I return the following based on the submit button that was selected to traverse to the appropriate page:
return mapping.findForward(form.getSubmit());
All is great, but this will break once I localize the buttons because the <html:submit> tag doesn't seem to allow the separation of logical and display values. I would like my references in my struts-config.xml file to be "logical" values and to specify the buttons in my JSP as follows (notice the addition of the value attribute):
<html:submit property="submit" value="Previous"><bean:message key="button.previous"/></html:submit>
<html:submit property="submit" value="Next"><bean:message key="button.next"/></html:submit>
My hope was that the above would render resource bundle text to the screen while delivering the logic "value" to the ActionForm in getSubmit().
The reality is that "value" attribute seems to override the <bean:message> is the HTML output so I don't get localized text in the submit buttons.. Is this a bug in the Struts html submit tag?
Thanks in advance.
Jeff Small
jsmall@kivera.com