NumberField (Vaadin 8)
NumberField converted to Vaadin 8
Original Vaadin 6 version Vaadin 7 version Vaadin 7 compatibility version for Vaadin 8 projects
Sample code
final NumberField numberField = new NumberField(); numberField.setLocale(Locale.FRANCE); numberField.setCaption("Modified settings:"); numberField.setDecimalPrecision(2); numberField.setDecimalSeparator(','); numberField.setGroupingSeparator('.'); numberField.setDecimalSeparatorAlwaysShown(true); numberField.setMinimumFractionDigits(2); numberField.setMinValue(5); final Binder<Bean> binder = new Binder<>(Bean.class); binder.forField(numberField) .withConverter(NumberField.getConverter("Conversion error")) .bind("number"); binder.setBean(new Bean()); layout.addComponent(numberField);
Links
Compatibility
Was this helpful? Need more help?
Leave a comment or a question below. You can also join
the chat on Discord or
ask questions on StackOverflow.
Version
- Vaadin 8 & Java 8
- Default validation happens in ValueChangeListener because there are no more validators in fields
- There is no automated converter because that also doesn't happen within fields anymore, you need to add NumberField.getConverter() to your Binder
- Small API tweaks
- Released
- 2017-03-31
- Maturity
- EXPERIMENTAL
- License
- Apache License 2.0
Compatibility
- Framework
- Vaadin 8.0+
- Browser
- N/A
NumberField (Vaadin 8) - Vaadin Add-on Directory
NumberField converted to Vaadin 8[Original Vaadin 6 version](https://vaadin.com/addon/numberfield)
[Vaadin 7 version](https://vaadin.com/directory#!addon/numberfield-vaadin-7)
[Vaadin 7 compatibility version for Vaadin 8 projects](https://vaadin.com/directory#!addon/numberfield-vaadin-7-compatibility)
Issue TrackerSource Code
Discussion Forum
NumberField (Vaadin 8) version 0.2.0
* Vaadin 8 & Java 8
* Default validation happens in ValueChangeListener because there are no more validators in fields
* There is no automated converter because that also doesn't happen within fields anymore, you need to add NumberField.getConverter() to your Binder
* Small API tweaks