Page History
This page describes two ways in which you may define the type of a field in Magnolia. The page also contains a list of short field names that
Table of Contents |
---|
The class and fieldType properties
a dialog.
Table of Contents |
---|
Defining fields
When creating a dialog, you usually want it to contain fields that build its core functionality for user tasks such entering a text into a field and sending it to the server upon hitting the SUBMIT button. Any field like that must be defined in a dialog definition through a field definition which must A field definition must contain – at minimum – a property telling Magnolia what type of field it should render . class
or a fieldType
in the dialog.
Using the class
property
Until the release of Magnolia 5.7, the only way to specify the type of a dialog field was to state a fully qualified class name. For example, to define a simple text field named title
for a dialog's tab called tabText
you had to include the following in your code:
Code Block | ||
---|---|---|
| ||
form:
tabs:
- name: tabText
fields:
- name: title
class: info.magnolia.ui.form.field.definition.TextFieldDefinition |
Currently in a dialog definition, to specify the type of field you must supply a fully qualified class name of the field, for example:
to provide a fully qualified
class or a fieldType
The definition by class
is the traditional (older) way, very well known to Java developers. The definition by fieldType
has been implemented in Magnolia with the release of the 5.7 branch and is oriented towards front-end developers who may have only very little or no knowledge of Java.
...