From d8e1ca9ad8ce76185837053a730676fa9fa18352 Mon Sep 17 00:00:00 2001
From: Pekka Hyvönen <pekka@vaadin.com>
Date: Mon, 19 Dec 2016 19:31:36 +0200
Subject: Fix documentation for /components (#8051)

Added warning where not updated.
Removed outdated documentation.
Tried to fix parts where it was feasible.
---
 documentation/components/components-fields.asciidoc | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

(limited to 'documentation/components/components-fields.asciidoc')

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()
-- 
cgit v1.2.3

