Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-1019

Creating a required Number-Field does not work as expected

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: 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 .

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: