You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dimitris Mouchritsas <di...@eurodyn.com> on 2008/07/30 18:09:18 UTC

Disable validation when clicking back

Hi all,

I have a multi-page form bean for a 2 step registration form. In the 
second page I have a back button like this:

        <button name="my.company.package.BACK_BUTTON" type="submit">
            <bean:message key="prompt.back.button" />
        </button>

and in my action I check if it was pressed similarly to the cancel button:
....
        if (isCancelled(request)) {
            targetUrl = "goHome";
        } else if (isBack(request)) {
            targetUrl = "goRegisterOrg";
        } else {
.....
    private boolean isBack(HttpServletRequest request) {
        String back = (String)request.getParameter(EDConstants.BACK_BUTTON);

        return (back != null);
    }


My problem is, how do I disable validator from checking the form? 
Currently the user presses the back
button and validation errors show up, so he has to enter some valid 
values to go back. Any ideas?

Thanks
Dimitris

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org