Struts 2
  1. Struts 2
  2. WW-2168

Javascript validation displays error messages, cancel does not clear them

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.9
    • Fix Version/s: 2.1.3
    • Component/s: Plugin - Tags
    • Labels:
      None

      Description

      1- form validate=true
      2- fill form with invalid data
      3- click submit
      4- errors are displayed
      5- click cancel
      6- error are not cleared

        Activity

        Hide
        Florent Ramière added a comment -

        clearErrorMessages and clearErrorLabels methods should be called upon reset action

        A solution would be in src/main/webapp/template/simple/form.ftl

        onreset="${parameters.onreset?default('clearErrorMessages(this);clearErrorLabels(this);')"

        Show
        Florent Ramière added a comment - clearErrorMessages and clearErrorLabels methods should be called upon reset action A solution would be in src/main/webapp/template/simple/form.ftl onreset="${parameters.onreset?default('clearErrorMessages(this);clearErrorLabels(this);')"
        Hide
        musachy added a comment -

        "onreset" added to the form tag. onreset will be set only when the form is in "xhtml" or "css_xhtml" when a form has validate="true", and "onreset" has not been set explicitly

        Show
        musachy added a comment - "onreset" added to the form tag. onreset will be set only when the form is in "xhtml" or "css_xhtml" when a form has validate="true", and "onreset" has not been set explicitly

          People

          • Assignee:
            musachy
            Reporter:
            Florent Ramière
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development