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 expanders 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 Fields 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 field |
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 field |
boolean | Shown and edited as checkbox |
integer | Shown as a number, edited in a number input field with only integers allowed |
spinner | Not supported anymore |
number | Shown as a number, edited in a number input field 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:
Compatibility
If a ValueField references a ValueFieldType, an equivalent ValueType will be provided to keep it compatible with the current expanders.
Likewise, for ValueFields with only a ValueType, an equivalent ValueFieldType will be defined, so that outdated expanders have the chance to be updated.