Skip to main content

ValueField Types (deprecated)

caution

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 to true, 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​

NameDescription
stringShown as text, edited with basic input fieldFieldA property of a DataElement expanded to a database column and user interface input element.
memoShown as html, edited with a rich text editor
multilineShown as multiple lines of text, edited with a text box
hyperlinkShown as a link, edited as input
fileShown as a download link, edited as file upload button
passwordShown as masked text, edited with password input fieldFieldA property of a DataElement expanded to a database column and user interface input element.
booleanShown and edited as checkbox
integerShown 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
spinnerNot supported anymore
numberShown 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
dateShown as a formatted date, edited with a calendar widget
dateLongShown as a formatted date + time, edited with a calendar and time widget

Storage Types​

NameJava Class
integerjava.lang.Integer
doublejava.lang.Double
shortjava.lang.Short
longjava.lang.Long
booleanjava.lang.Boolean
bigdecimaljava.math.BigDecimal
datejava.util.Date
byte[]java.lang.byte[]
stringjava.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:

Option
maven.component.isJarModule Component

Packages 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.