Tapestry
  1. Tapestry
  2. TAPESTRY-1019

Creating a required Number-Field does not work as expected

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0.1
    • Fix Version/s: 4.1
    • Component/s: Framework
    • Labels:
      None

      Description

      If "hoNr" is an Integer property the following code sets it to null, if the user starts his input with a blank (" 123"):

      <INPUT jwcid="hoNr@TextField" displayName="Verkaufs-Händler"
      value="ognl:hoNr"
      validators="validators:required,max=999999"
      translator="translator:number" />

      Workaround:
      Make the translator trim the value like this: translator="translator:number,trim"

      Proposed fix: Let the NumberTranslator set AbstractTranslator's trim-field to true by default

      Somewhat arbitrary Note: This is related to TAPESTRY-820. I'd LOVE to see that on fixed .

        Activity

        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12567817 ] jira [ 12590946 ]
        Mark Thomas made changes -
        Workflow jira [ 12376550 ] Default workflow, editable Closed status [ 12567817 ]
        Jesse Kuhnert made changes -
        Field Original Value New Value
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 4.1 [ 12310632 ]
        Marcus Schulte created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Marcus Schulte
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development