ValueField Types (deprecated)
ValueFieldTypes are deprecated. See ValueTypes for the new alternative.
ValueFieldTypes define how to store and represent the values of a ValueField. The expandersExpanderA unit of generation that combines a data tree instance (functional M1 model) with a template to generate an artifact. already provide a number of built-in ValueFieldTypes and the validation base-component introduces a few additional ValueFieldTypes.
It is also possible to define your own ValueFieldType by adding it to a Component. You can then use the ValueFieldTypes in FieldsFieldA property of a DataElement expanded to a database column and user interface input element. in the Component itself or Components that depend on it.
A ValueFieldType has a number of properties:
- name: The name, which is used to reference the type. It should be a valid java class-name.
- fullType: Usually the same as the name, but is less restricted. It is expanded in some places as alternative identifier.
- valueClass: A fully qualified java class name for the class that will represent values of this type.
- customTransportClass: If set to
false, a pojo class will be expanded with the name and package of the defined valueClass. If set totrue, the class will not be expanded and will have to be provided in some other way. - displayType: How to represent the value. Can be one of the options described below
- storageType: How to store the value. Can be one of the options described below
- validator/converter: If defined, they will override the default expanded validator/converter
Display Types
| Name | Description |
|---|---|
| string | Shown as text, edited with basic input fieldFieldA property of a DataElement expanded to a database column and user interface input element. |
| memo | Shown as html, edited with a rich text editor |
| multiline | Shown as multiple lines of text, edited with a text box |
| hyperlink | Shown as a link, edited as input |
| file | Shown as a download link, edited as file upload button |
| password | Shown as masked text, edited with password input fieldFieldA property of a DataElement expanded to a database column and user interface input element. |
| boolean | Shown and edited as checkbox |
| integer | Shown as a number, edited in a number input fieldFieldA property of a DataElement expanded to a database column and user interface input element. with only integers allowed |
| spinner | Not supported anymore |
| number | Shown as a number, edited in a number input fieldFieldA property of a DataElement expanded to a database column and user interface input element. with real numbers allowed |
| date | Shown as a formatted date, edited with a calendar widget |
| dateLong | Shown as a formatted date + time, edited with a calendar and time widget |
Storage Types
| Name | Java Class |
|---|---|
| integer | java.lang.Integer |
| double | java.lang.Double |
| short | java.lang.Short |
| long | java.lang.Long |
| boolean | java.lang.Boolean |
| bigdecimal | java.math.BigDecimal |
| date | java.util.Date |
| byte[] | java.lang.byte[] |
| string | java.lang.String |
Component with only ValueFieldTypes
If a Component does not contain any DataElements or TaskElements, you may run into issues at runtime. This is because the Components are packaged as ejb modules, which require at least one bean class.
To remedy this, add an option to package the Component as a Jar module:
ComponentPackages the logic and data layersLayerLogical separation of functionality within a single system/application, focused on code organization. of this component as a jar module (without beans).
This can be used if the Component only exists to provide reusable classes. E.g. only defines ValueFieldTypes.
<options>
<maven.component.isJarModule/>
</options>
Compatibility
If a ValueField references a ValueFieldType, an equivalent ValueType will be provided to keep it compatible with the current expandersExpanderA unit of generation that combines a data tree instance (functional M1 model) with a template to generate an artifact..
Likewise, for ValueFieldsFieldA property of a DataElement expanded to a database column and user interface input element. with only a ValueType, an equivalent ValueFieldType will be defined, so that outdated expandersExpanderA unit of generation that combines a data tree instance (functional M1 model) with a template to generate an artifact. have the chance to be updated.