Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-1906

Interaction between client-side validation and submit buttons can result in a server-side error parsing JSON array

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.3, 5.4
    • 5.3.3, 5.4
    • tapestry-core

    Description

      Enter invalid text into a field that has client side validation
      Hit enter (to submit the form)
      Update the field value to be valid
      Hit enter (to submit the form)
      Form is submitted with a query parameter "t:submit" set to the blank string
      This triggers an exception inside Form:

      A JSONArray text must start with '[' at character 0 of

      org.apache.tapestry5.json.JSONTokener.syntaxError(JSONTokener.java:384)
      org.apache.tapestry5.json.JSONArray.parse(JSONArray.java:126)
      org.apache.tapestry5.json.JSONArray.<init>(JSONArray.java:95)
      org.apache.tapestry5.corelib.components.Form.isFormCancelled(Form.java:590)
      org.apache.tapestry5.corelib.components.Form.advised$onAction_12856ebccc3a27e0(Form.java:511)
      org.apache.tapestry5.corelib.components.Form$Invocation_onAction_12856ebccc3a27df.proceedToAdvisedMethod(Unknown Source)
      org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:84)
      org.apache.tapestry5.ioc.internal.services.LoggingAdvice.advise(LoggingAdvice.java:37)
      org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:86)
      org.apache.tapestry5.corelib.components.Form.onAction(Form.java)

      Attachments

        Activity

          People

            hlship Howard Lewis Ship
            hlship Howard Lewis Ship
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: