Tapestry
  1. Tapestry
  2. TAPESTRY-2085

When a user submit a form with a TextField and the value is missing or blank, the value null is passed through the component to the model property

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 5.0.10
    • Fix Version/s: 5.0.10
    • Component/s: None
    • Labels:
      None

      Description

      This was initially reported on the dev list by Geoff Callender.

      When submitting a form containing a textfield and nothing has been typed into that textfield, the value will be submitted as null rather than the empty string. In past version, the empty string would be submitted.

      The net result is NPEs and coercion issues. If the textfield is bound to a String and that String is used without checking for null, an NPE will result when none used to. If the textfield is bound to any other type, such as an Integer, the Tapestry type coercer will fail with an appropriate exception (e.g., NumberFormatException).

        Activity

        Kevin Menard created issue -
        Howard M. Lewis Ship made changes -
        Field Original Value New Value
        Assignee Howard M. Lewis Ship [ hlship ]
        Howard M. Lewis Ship made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Howard M. Lewis Ship made changes -
        Status In Progress [ 3 ] Open [ 1 ]
        Howard M. Lewis Ship made changes -
        Summary Empty textfield submits null value When a user submit a form with a TextField and the value is missing or blank, the value null is passed through the component to the model property
        Howard M. Lewis Ship made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Howard M. Lewis Ship made changes -
        Status In Progress [ 3 ] Closed [ 6 ]
        Fix Version/s 5.0.10 [ 12312936 ]
        Resolution Fixed [ 1 ]
        Mark Thomas made changes -
        Workflow jira [ 12421990 ] Default workflow, editable Closed status [ 12567720 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12567720 ] jira [ 12590850 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development