Tapestry
  1. Tapestry
  2. TAPESTRY-847

Max and Min validators throw NumberFormatException

    Details

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

      Description

      I have a text field on a form into which a user is supposed to enter a number within a certain range. So I added the max and min validators to the text field hoping they would do what they're supposed to do. Unfortunately, a user quickly discovered that if they don't follow the instructions and enter a letter into that text field they get an ugly NumberFormatException. I poked around a little and found that I can't even catch that exception to present something nicer to the user because my listener method never even gets called. So, it would be extremely useful if the numerical related validators caught NumberFormatException and provided a "The value must a be number" error message.

      In this particular case, using any kind of drop down or selection box widget wouldn't work because the number range is quite large (basically from 0 to several million).

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        177d 10h 10m 1 Jesse Kuhnert 23/Jul/06 16:13
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12567628 ] jira [ 12590762 ]
        Mark Thomas made changes -
        Workflow jira [ 12346235 ] Default workflow, editable Closed status [ 12567628 ]
        Jesse Kuhnert made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Invalid [ 6 ]
        Fix Version/s 4.1 [ 12310632 ]
        Hide
        Jesse Kuhnert added a comment -

        The "translator" binding should be used on numeric input fields, in addition to the validators binding.

        Show
        Jesse Kuhnert added a comment - The "translator" binding should be used on numeric input fields, in addition to the validators binding.
        Chris Conrad created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Chris Conrad
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development