Versions Compared

Key

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

...

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 CustomPropertyType set as Field PropertyDatasource.  

Default behavior

Basic Property

By default BasicProperty and BasicPropertyHandler are used.

...

  • 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.

Composite Property

Composite Property (CompositeProperty) are used by the following fields:

  • CompositeField
  • SwitchableField

CompositeField

This field is by default bound with  SimplePropertyCompositeHandler . This handler will store each single field part of the CompositeField as single suffixed property.
Assume that your CompositeField is called 'composite' and contains two fields: a text field called 'simpleText' and a date field called 'simpleDate'. The  values will be stored as following:

Advanced Tables - Table Plus
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse
Node nameValue
Paragraph

compositesimpleText
some text value
Paragraph

compositesimpleDate
2006-05-01T21:47:58.230+02:00

 

SwitchableField

This field is by default bound with  SwitchableSimplePropertyCompositeHandler . This handler will store each single field part of the SwitchableField as single suffixed property.
Assume that your SwitchableField is called 'switchable' and contains two fields: a text field called 'simpleText' and a date field called 'simpleDate'. The  values will be stored as following:

Advanced Tables - Table Plus
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse
Node nameValue
Paragraph

switchable
text (last tab selected)
Paragraph

switchablesimpleText
some text value
Paragraph

switchablesimpleDate
2006-05-01T21:47:58.230+02:00

List Property

List Property (ListProperty) are used by the following field:

  • MultiField

MultiField

This field is by default bound with  MultiValuesPropertyMultiHandler . This handler will store each single field part of the MultiField as a multiValue property (Basically a JCR multiValue property represented a a Typed List property).

i18n

All default implementation support the i18n definition.
If for example you have two language defined ('en', 'de') with 'en' set as default language:

Advanced Tables - Table Plus
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse
Node nameValue

formNode

 

   
Paragraph

simpleText
Simple English Text
   
Paragraph

simpleText_de
Einfache deutsche Text
   
Paragraph

multiValueText
English1,English2,English3
   
Paragraph

multiValueText_de
Deutsche1,Deutsche2

If you want to implement your own implementation of PropertyHandler that support i18n, your implementation will need to:

  • return true for PropertyHandler.hasI18NSupport() 
  • implement a compatible Magnolia i18n logic.

Implemented

Implemented Property

...