Uploaded image for project: '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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 5.0.10
    • 5.0.10
    • None
    • 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).

      Attachments

        Activity

          People

            hlship Howard Lewis Ship
            nirvdrum Kevin Menard
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: