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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.3, 5.4
    • Fix Version/s: 5.3.3, 5.4
    • Component/s: tapestry-core
    • Labels:

      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)

        Activity

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Howard M. Lewis Ship
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development