struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hezjing <>
Subject [S2] Multiple buttons in a form
Date Mon, 04 Feb 2008 06:04:24 GMT

I have a form with multiple buttons,

<s:form namespace="/user" action="updateUser" method="post">
   <s:submit name="action" value="resetPassword" key="button.resetPassword" />
   <s:submit name="action" value="delete" key="button.delete" />

and my action class looks like the following,

public String execute() throws Exception {
    if (action.equals("resetPassword")) {
    } else if (action.equals("delete")) {
    return SUCCESS;

This action is working, except that the label/text of the buttons are
not fetched from the i18n properties file.

The buttons are displayed as "resetPassword" and "delete".

What is the good way to implement a form with multiple buttons, while
maintaining the i18n?



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message