diff options
author | Pekka Hyvönen <pekka@vaadin.com> | 2016-12-19 19:31:36 +0200 |
---|---|---|
committer | Henri Sara <henri.sara@gmail.com> | 2016-12-19 19:31:36 +0200 |
commit | d8e1ca9ad8ce76185837053a730676fa9fa18352 (patch) | |
tree | 40a0e85d909953c68bbe13c4eade04c9a4fd5860 /documentation/components/components-fields.asciidoc | |
parent | 33624758f960e9d2f0f67dadd307ae81fd427d65 (diff) | |
download | vaadin-framework-d8e1ca9ad8ce76185837053a730676fa9fa18352.tar.gz vaadin-framework-d8e1ca9ad8ce76185837053a730676fa9fa18352.zip |
Fix documentation for /components (#8051)
Added warning where not updated.
Removed outdated documentation.
Tried to fix parts where it was feasible.
Diffstat (limited to 'documentation/components/components-fields.asciidoc')
-rw-r--r-- | documentation/components/components-fields.asciidoc | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/documentation/components/components-fields.asciidoc b/documentation/components/components-fields.asciidoc index b839b7f729..45325b9146 100644 --- a/documentation/components/components-fields.asciidoc +++ b/documentation/components/components-fields.asciidoc @@ -7,6 +7,8 @@ layout: page [[components.fields]] = Field Components +*_This section has not yet been updated for Vaadin Framework 8_* + ((("[classname]#Field#", id="term.components.fields", range="startofrange"))) _Fields_ are components that have a value that the user can change through the @@ -66,13 +68,10 @@ displayed in a tooltip when the mouse pointer hovers over the error indicator. [[components.fields.valuechanges]] == Handling Field Value Changes -[classname]#Field# provides two methods for listening to changes to the field value: -[methodname]#onChange# and [methodname]#addValueChangeListener#. The difference -is that the former takes a [interfacename]#Consumer# object that only receives the new value; -the latter, on the other hand, takes an [interfacename]#EventListener# that gets -a [classname]#ValueChange# event instance containing extra information about the event. +[classname]#Field# provides [methodname]#addValueChangeListener# method for listening to changes to the field value. This method takes a [interfacename]#EventListener# that gets +a [classname]#ValueChange# event instance containing information about the event. -Both methods return a [classname]#Registration# object that can be used to later +This method returns a [classname]#Registration# object that can be used to later remove the added listener if necessary. [source, java] @@ -80,9 +79,6 @@ remove the added listener if necessary. TextField textField = new TextField(); Label echo = new Label(); -// Just echo in the label anything the user enters -textField.onChange(echo::setValue); - // Add a more complex listener textField.addValueChangeListener(event -> { String origin = event.isUserOriginated() |