From bd79d2ba5fa67c84b9d589ccb58556ee331379a0 Mon Sep 17 00:00:00 2001 From: Markus Koivisto Date: Fri, 22 Jan 2016 14:55:18 +0200 Subject: Add documentation to master branch Change-Id: I2504bb10f1ae73ec0cbc08b7ba5a88925caa1674 --- .../components/components-customfield.asciidoc | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 documentation/components/components-customfield.asciidoc (limited to 'documentation/components/components-customfield.asciidoc') diff --git a/documentation/components/components-customfield.asciidoc b/documentation/components/components-customfield.asciidoc new file mode 100644 index 0000000000..f57eb2debf --- /dev/null +++ b/documentation/components/components-customfield.asciidoc @@ -0,0 +1,33 @@ +--- +title: Composite Fields with CustomField +order: 32 +layout: page +--- + +[[components.customfield]] += Composite Fields with [classname]#CustomField# + +The [classname]#CustomField# is a way to create composite components like with +[classname]#CustomComponent#, except that it implements the +[interfacename]#Field# interface and inherit [classname]#AbstractField#, +described in +<>. A field allows editing a property value in the Vaadin data model, +and can be bound to data with field groups, as described in +<>. The field values are buffered and can be +validated with validators. + +A composite field class must implement the [methodname]#getType()# and +[methodname]#initContent()# methods. The latter should return the content +composite of the field. It is typically a layout component, but can be any +component. + +It is also possible to override [methodname]#validate()#, +[methodname]#setInternalValue()#, [methodname]#commit()#, +[methodname]#setPropertyDataSource#, [methodname]#isEmpty()# and other methods +to implement different functionalities in the field. Methods overriding +[methodname]#setInternalValue()# should call the superclass method. + + + -- cgit v1.2.3