Tapestry
  1. Tapestry
  2. TAPESTRY-2056

Add configurable null handling for text fields

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.7
    • Fix Version/s: 5.0.8
    • Component/s: None
    • Labels:
      None

      Description

      Currently, the handling of null values (on the server) and blank values (from the client) is a bit of a mess. Particularily with numeric fields, nulls might mean a blank space, or they might be treated as zero and formatted accordingly. Making this another configurable parameter with smart defaults (ala translate and validate) would be a huge improvement over the current approach (extra coercions from null to various types).

        Activity

        Hide
        Howard M. Lewis Ship added a comment -

        Part of this fix is to back out some changes that coerced nulls to various flavors of zero.

        This introduces a new parameter, nulls, to TextField (and PasswordField and TextArea). The default is to leave nulls alone. It can be set to "zero" to substitute zero for the value instead.

        Show
        Howard M. Lewis Ship added a comment - Part of this fix is to back out some changes that coerced nulls to various flavors of zero. This introduces a new parameter, nulls, to TextField (and PasswordField and TextArea). The default is to leave nulls alone. It can be set to "zero" to substitute zero for the value instead.

          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