Page History
...
Another good example for illustrating the Transformer
behavior is the MultiValueField.
The the related field Property
can no more be a simple Property
but rather a complex property containing several values. This property is a PropertysetItemt
(a Property
containing several Property
).
Mockup | ||||
---|---|---|---|---|
|
The way values of the ListProperty
are 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. PropertyHandler
is the second information needed. PropertyHandler
handle the way property element are retrieve and set to an Item
.previous mockup display a Date multi value field (3). This field is associated to a PropertysetItemt
that contains the individual Date Property
. This property delegate the read and write to a Transformer
(1) This Transformer
knows how to read and write the individual Date Property
from and to the related form item. In this example the Transformer
is bound to an Item property of type list. This introduce another big advantage introduce by the Transformer
's. For the same field it is possible to define several read/write strategy:
Store the field values into a single array, or into sub items, ...
REVIEW THE SECTION DOWN HERE
Configuration
These configurations are done in the common fields Properties.
...