Directory

NumberField - Vaadin Add-on Directory

Numeric text field with automatic keystroke filtering and validation for integer (123) and decimal numbers (12.3). NumberField - Vaadin Add-on Directory
NumberField provides a numeric text field with automatic keystroke filtering and validation for integer (123) and decimal numbers (12.3). The minus sign and user-definable grouping and decimal separators are supported. Inputs are validated on client- and server-side. The client-side validator gets active on every keypress in the field. If the keypress would lead to an invalid value, it is suppressed and the value remains unchanged. The server-side validation is triggered when the field loses focus. An user-entered value is formatted automatically when the field's focus is lost. NumberField uses Java's DecimalFormat for formatting and send the formatted value of the input back to client. There's a number of setters to define the format, see the code example below for a general view.