...
Info |
---|
|
Excerpt |
---|
The delegating transformers classes should be your first choice since they are the most versatile. If you can, use DelegatingCompositeFieldTransformer or DelegatingMultiValueFieldTransformer rather than the other available classes. |
|
BasicTransformer
Javadoc |
---|
className0 | info.magnolia.ui.form.field.transformer.basic.BasicTransformer |
---|
|
stores stores the field value in a single property. The property has the same name as the field definition node. You can provide a different name with a
name
property in the
field definition. This transformer creates a new property if the property does not yet exist.
...
CompositeTransformer
Javadoc |
---|
className0 | info.magnolia.ui.form.field.transformer.composite.CompositeTransformer |
---|
renderType | asynchronous |
---|
|
stores each child field value as a single property. Composite fields which consist of multiple child fields use CompositeTransformer
by default.
...
DelegatingCompositeFieldTransformer
Javadoc |
---|
className0 | info.magnolia.ui.form.field.transformer.composite.DelegatingCompositeFieldTransformer |
---|
renderType | asynchronous |
---|
|
stores each child field value as a single property. The di
fference between this transformer and the other composite transformers is that it uses the child field name as the storage property name. Transformer class: info.magnolia.ui.form.field.transformer.composite.DelegatingCompositeFieldTransformer DelegatingCompositeFieldTransformer
Example composite field definition containing a text field and date field that uses DelegatingCompositeFieldTransformer
:
Localtab Group |
---|
Localtab |
---|
|
Code Block |
---|
| form:
tabs:
- name: tabEvent
label: Event
fields:
- name: composite
class: info.magnolia.ui.form.field.definition.CompositeFieldDefinition
transformerClass: info.magnolia.ui.form.field.transformer.composite.DelegatingCompositeFieldTransformer
label: Event
fields:
- name: title
class: info.magnolia.ui.form.field.definition.TextFieldDefinition
label: Title
- name: date
class: info.magnolia.ui.form.field.definition.DateFieldDefinition
label: Date |
|
Localtab |
---|
|
Advanced Tables - Table Plus |
---|
enableHeadingAttributes | false |
---|
enableSorting | false |
---|
class | m5-configuration-tree |
---|
enableHighlighting | false |
---|
|
Node name | Value |
---|
|
| |
| |
| |
| |
| |
| |
| | info.magnolia.ui.form.field.definition.TextFieldDefinition | | Title | |
| | info.magnolia.ui.form.field.definition.DateFieldDefinition | | Date | | info.magnolia.ui.form.field.definition.CompositeFieldDefinition | | Event | | info.magnolia.ui.form.field.transformer.composite.DelegatingCompositeFieldTransformer |
|
|
|
...
NoOpCompositeTransformer
Use
Javadoc |
---|
className0 | info.magnolia.ui.form.field.transformer.composite.NoOpCompositeTransformer |
---|
renderType | asynchronous |
---|
|
for for a
composite field that is inside a
multivalue parent parent field.
"NoOp" means no operation – NoOpCompositeTransformer
does not perform any writeToItem
or readFromItem
operations, it just acts as a property container. The transformer of the parent multivalue field does the reading and writing of the item structure to the repository. You can use any of the multivalue transformers below in the parent. The parent transformer passes the properties to the NoOpCompositeTransformer
as a Vaadin PropertysetItem
.Transformer class: info.magnolia.ui.form.field.transformer.composite.NoOpCompositeTransformer
...
Switchable fields use
Javadoc |
---|
className0 | info.magnolia.ui.form.field.transformer.composite.SwitchableTransformer |
---|
|
by by default. This transformer stores the selected field value as a single suffixed property.
...
MultiValueTransformer
Javadoc |
---|
className0 | info.magnolia.ui.form.field.transformer.multi.MultiValueTransformer |
---|
renderType | asynchronous |
---|
|
is is the default transformer for multivalue fields. The transformer stores field values in a LinkedList<T>
collection. The linked list is then automatically converted to a JCR multivalue property when persisted to the JCR. In the repository it looks like a typical array: comma-separated and enclosed in square brackets.
...
MultiValueJSONTransformer
Javadoc |
---|
className0 | info.magnolia.ui.form.field.transformer.multi.MultiValueJSONTransformer |
---|
renderType | asynchronous |
---|
|
stores the values as a comma-separated list of Strings.
...
DelegatingMultiValueTransformer
Javadoc |
---|
className0 | info.magnolia.ui.form.field.transformer.multi.DelegatingMultiValueFieldTransformer |
---|
renderType | asynchronous |
---|
|
delegates delegates the responsibility of storing field values to the parent field. In doing so, this transformer creates a list of Item objects. The child field uses the Item to create and retrieve its own properties.
Delegation makes it possible to nest unlimited levels of fields. For example, create a composite field which contains a multivalue field which contains a switchable field and so on....
Use the more versatile DelegatingMultiValueTransformer instead of this transformer if you can.
Javadoc |
---|
className0 | info.magnolia.ui.form.field.transformer.multi.MultiValueChildrenNodeTransformer |
---|
renderType | asynchronous |
---|
|
MultiValueChildrenNodeTransformer
doesn't create a node for the multivalue parent field at all. It creates nodes for the child fields and stores their values as properties. This structure is equivalent to the JCR structure of the form Item.
...
Use the more versatile DelegatingMultiValueTransformer instead of this transformer if you can.
Javadoc |
---|
className0 | info.magnolia.ui.form.field.transformer.multi.MultiValueSubChildrenNodeTransformer |
---|
renderType | asynchronous |
---|
|
first first creates a node for the parent multivalue field. It then stores the child fields as numbered properties.
...
Use the more versatile DelegatingMultiValueTransformer instead of this transformer if you can.
Javadoc |
---|
className0 | info.magnolia.ui.form.field.transformer.multi.MultiValueSubChildrenNodeTransformer |
---|
renderType | asynchronous |
---|
|
first first creates a node for the parent multivalue field. It then stores the child fields as
subnodes and their values as properties.
...
Use the more versatile DelegatingMultiValueTransformer instead of this transformer if you can.
Javadoc |
---|
className0 | info.magnolia.ui.form.field.transformer.multi.MultiValueSubChildrenNodePropertiesTransformer |
---|
renderType | asynchronous |
---|
|
is equivalent to
MultiValueChildrenNodeTransformer but it is able to handle a composite field as the child of the multivalue parent.
...