Announcement Announcement Module
Collapse
No announcement yet.
Clear errors on back button Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Clear errors on back button

    I have setup a multi-page form using the AbstractWizardFormController and implemented page by page validation. I call my validator methods from the controller's validatePage() method using a case statement similar to:


    Code:
    switch(page){
        case 0:
        accountActivationValidator.validateUserDetails(command, errors);
        break;
        case 1:
        accountActivationValidator.validateLinkageAccount(command, errors);
        break;
        case 2:
    etc...
    Validation works great until I try to go back to a previous page without having set the current page command properties.

    Example:
    On page 4....Fields empty...submit page target to previous page _target2 in this case...Page 3 displays with the errrors generated from page 4's empty form properties.

    Could someone suggest a way to clear the errors when going back a page?

    thanks in advance.
Working...
X