Announcement Announcement Module
Collapse
No announcement yet.
Converting user input to an integer Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Converting user input to an integer

    Hi there

    My users are getting a NumberFormatException when entering numbers separated with commas, eg. '12,000'. I'd like my webapp to be intelligent enough to convert this to an integer without throwing back an error to the user and making them do the work removing that comma.

    What is the best way of binding this input to an int field? Should I use a CustomNumberEditor and a NumberFormat?

  • #2
    Should I use a CustomNumberEditor and a NumberFormat?
    Yes, that should work.

    Comment

    Working...
    X