ObjectProperty - simply implementation of Property that stores any Java object
Converter & ConverterFactory
there is Application-wide converter factory
can expand default converter factory and register with application; see example
Implementing Property interface
Item
collection of properties identified by PID (property ID)
usage: table (row), tree (node), form (field)
built-in
PropertysetItem : manually adds name and Property
BeanItem : wrapping beans
add MethodProperty
add NestedMethodProperty
Form (implements Item)
events
Creating Forms
FieldGroup – grouping fields and also provides buffering / validation; facility class, not UI
simple binding:
form.addComponent(component)
FieldGroup binder = new FieldGroup(item)
binder.bind(component, "name")
bind(Field, “name”) - binds field UI with name of item source
buildAndBind(“Caption”, “name”) - build field UI with a factory and then bind the UI with the name of the item source; the UI is still needed to be added to a layout manually
bindMemberFields() - create bindings automatically, optionally use @PropertyId to annotate member
buffering – commit() runs validation and only write back to data source on success / discard()
setBuffered() - true by default
validation – Java Bean Validation with annotation; annotation / validation / localization of messages