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

Creating a required Number-Field does not work as expected

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.0.1
    • 4.1
    • Framework
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: