diff options
author | elmot <elmot@vaadin.com> | 2015-09-25 16:40:44 +0300 |
---|---|---|
committer | elmot <elmot@vaadin.com> | 2015-09-25 16:40:44 +0300 |
commit | a1b265c318dbda4a213cec930785b81e4c0f7d2b (patch) | |
tree | b149daf5a4f50b4f6446c906047cf86495fe0433 /documentation/components/components-customfield.asciidoc | |
parent | b9743a48a1bd0394f19c54ee938c6395a80f3cd8 (diff) | |
download | vaadin-framework-a1b265c318dbda4a213cec930785b81e4c0f7d2b.tar.gz vaadin-framework-a1b265c318dbda4a213cec930785b81e4c0f7d2b.zip |
Framework documentation IN
Change-Id: I767477c1fc3745f9e1f58075fe30c9ac8da63581
Diffstat (limited to 'documentation/components/components-customfield.asciidoc')
-rw-r--r-- | documentation/components/components-customfield.asciidoc | 33 |
1 files changed, 33 insertions, 0 deletions
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 +<<dummy/../../../framework/components/components-fields#components.fields,"Field +Components">>. A field allows editing a property value in the Vaadin data model, +and can be bound to data with field groups, as described in +<<dummy/../../../framework/datamodel/datamodel-itembinding#datamodel.itembinding,"Creating +Forms by Binding Fields to Items">>. 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. + + + |