Binding Text Input to a Process Variable
A text input can be bound to a process variable using the cam-variable-type
andcam-variable-name
directives:
In the example above, the text input field is bound to the variable named CUSTOMER_ID
of typeString
.
Supported Variable Types for Text Inputs
A text input field supports multiple variable types.
Binding to existing variables: Note that if you bind the input field to an existing variable,the type of the variable is provided by the process engine and the cam-variable-type
directiveis not required.
Example:
cam-variable-name="CUSTOMER_ID"
cam-variable-type="String" />
Trimming: Note that the value of the String variable is trimmed before it is submitted to theprocess engine: leading and trailing whitespace is removed.
To bind the input field to a Java Integer
variable, the directivecam-variable-type="Integer"
must be used.
Example:
Example:
cam-variable-type="Long" />
To bind the input field to a Java Short
variable, the directivecam-variable-type="Short"
must be used.
Example:
To bind the input field to a Java Double
variable, the directivecam-variable-type="Double"
must be used.
<input type="text"
cam-variable-name="CUSTOMER_REVENUE"