Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Now for a MultiField, the related Property can no more be a simple Property but rather a ListProperty . This ListProperty will be populated with the individual field Property values.
This is the first information needed in order to handle complex fields: The PropertType (Basic, List, Composite,...)

Mockup
AlignmentLeft
Namefields 2

The way values of the ListProperty is set and retrieve from the related Item is also something we would like to configure. For example I may want to have a MultiField composed of DateField stored in a single multi value.
The same field may be used in another place but the values have to be stored as sub item (nodes) elements.
PropertHandler PropertyHandler is the second information needed. PropertHandler PropertyHandler handle the way property element are retrieve and set to an Item.

Configuration

These configurations are done in the common fields Properties.

PropertyDescriptionDefault valueValid values
propertyBuilder

Concrete property Type and Handler definition. Optional.
If not defined,  BasicProperty and BasicPropertyHandler are used.
(warning) ComplexeFieldDefinition may define default property Type and Handler in their constructor.

  

...

    propertyHandlerImplementation class of  PropertyHandler set to the propertyType used to set and get values in certain format.  
    propertyTypeImplementation class of Vaadin Property set as Field PropertyDatasource.  

Default behavior

By default BasicProperty and BasicPropertyHandler are used.

The field is created based on the related form ItemBasicPropertyHandler will:

  • Retrieve the Item.property if this property already exist on the Item.
    property is search based on the Field name defined as name property on the field definition. 
  • Create the Item.property if this property do not yet exist on the Item.
     property is created based on the following field definition:
    • type: property will get the desired type
    • defaultValue: if define, the string representation of the default field value is converted to a new typed value.  

Configuration

...

Implemented

Implemented Property

...