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

          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