public enum XPropertyEnum extends Enum<XPropertyEnum>
When you create a widget plugin to add a new form element to FORMCYCLE, you need to specify which properties your widget should have. First decide on the type of form element (input text, upload fields, pages, headers etc.), then see the individual constants below, which explain whether they are needed for that particular type of form element. Also, please note that each property specifies the data type of its value, see below.
A note on data types: Most properties have their data type set to String
. By convention, boolean attributes
are represented by a string, with 0
being false
and 1
being true
. Numbers are usually
stored as a string with their decimal representation. Finally, when a property is empty, the default value is used
instead.
To illustrate, this is a typical JSON structure for a simple form with one text input field, one select field, and one set of buttons (with a back, next, and submit button):
Click to expand JSON snippet
[
{
"properties": {
"maxwidth": "700px",
"computedwidth": "100%",
"viewstatus": [],
"viewusergroup": [],
"rowid": "",
"cssclasses": [],
"backgroundcolor": "",
"showrequiredhint": false,
"usergrouppendent": "",
"minwidth": "300px",
"print_hide": "0",
"statusdependent": "",
"name": "header1",
"attributes": [],
"comment": "",
"id": "xi-header-1"
},
"className": "XHeader"
},
{
"properties": {
"maxwidth": "700px",
"viewstatus": [],
"viewusergroup": [],
"readonly_viewusergroup": [],
"rowid": "",
"backgroundcolor": "",
"readonly_viewstatus": [],
"usergrouppendent": "",
"helptext": "",
"print_hide": "0",
"print_size": "16",
"statusdependent": "",
"id": "xi-p-1",
"readonly_usergrouppendant": "",
"computedwidth": "100%",
"i18n": {},
"cssclasses": [],
"readonly_statusdependent": "",
"subheader": "",
"print_break": "0",
"minwidth": "300px",
"name": "p1",
"header": "",
"attributes": [],
"comment": ""
},
"className": "XPage"
},
{
"properties": {
"maxvalue": "6",
"requiredif": "xi-sel-2",
"readonly_viewusergroup": [
"[!]Administrators",
"Users"
],
"hiddenifvalue": "",
"required": "1",
"rowid": "",
"readonly_viewstatus": [
"[!]-1"
],
"helptext": "<p>Help text</p>\n",
"print_size": "10",
"dynamic": "1",
"id": "xi-tf-6",
"readonlyifvalue": "3",
"labeldir": "top",
"maxlength": "255",
"labelwidth": "120px",
"requiredifvalue": "",
"readonlyifclear": "1",
"readonlyifmode": "2",
"datepicker": "1",
"dynamicMinSize": "1",
"i18n": {},
"print_text_only": "1",
"aliasname": "asd",
"unit": "Unit",
"dynamicHideButtons": "",
"requiredifcomp": 0,
"name": "tfOther",
"minlength": "3",
"viewstatus": [
"Eingegangen"
],
"viewusergroup": [
"Administrators",
"Users"
],
"dynamicMaxSize": "10",
"vrule": "",
"readonlyifcomp": "4",
"title": "Title",
"servervalidate": "1",
"parentid": "xi-p-1",
"usergrouppendent": "1",
"datatype": "money",
"print_hide": "0",
"flex": "1",
"print_func": "Word function",
"statusdependent": "1",
"isreadonly": "",
"placeholder": "Placeholder",
"value": "initial value",
"readonly_usergrouppendant": "1",
"mask": "0",
"computedwidth": "100%",
"ishidden": "",
"unitwidth": "60px",
"requiredgroup": "ad",
"hiddenifclear": "1",
"label": "<p>Label</p>",
"minvalue": "3",
"cssclasses": [
".my-style",
".your-style"
],
"readonly_statusdependent": "1",
"print_break": "1",
"equals": "xi-tf-6",
"hiddenifcomp": 0,
"attributes": [
{
"value": "val",
"text": "attr1"
}
],
"hiddenif": "xi-sel-2",
"comment": "",
"vrulemismatch": "",
"dynamicTrigger": "xi-sel-2",
"readonlyif": "xi-sel-2"
},
"className": "XTextField"
},
{
"properties": {
"questions": [
{
"value": "Question 1"
},
{
"value": "Question 2"
},
{
"value": "Question 3"
}
],
"requiredif": "",
"checkboxmin": "",
"readonly_viewusergroup": [],
"hiddenifvalue": "",
"required": "1",
"rowid": "",
"readonly_viewstatus": [],
"helptext": "",
"print_size": "10",
"selectcolumnwidth": "0",
"options": [
{
"text": "Option 1",
"title": "",
"value": "1"
},
{
"text": "Option 2",
"title": "",
"value": "2"
},
{
"text": "Option 3",
"title": "",
"value": "3"
}
],
"dynamic": "0",
"id": "xi-sel-2",
"readonlyifvalue": "0",
"labeldir": "top",
"selecttextlayout": "right",
"isdisabled": "1",
"labelwidth": "120px",
"requiredifvalue": "",
"readonlyifclear": "1",
"dynamicMinSize": "1",
"i18n": {},
"print_text_only": "1",
"aliasname": "myalias",
"unit": "",
"print_list": "0",
"dynamicHideButtons": "",
"datasource": "",
"requiredifcomp": 0,
"name": "sel2",
"cob2auto": "1",
"viewstatus": [
"Eingegangen"
],
"viewusergroup": [],
"dynamicMaxSize": "10",
"readonlyifcomp": 0,
"servervalidate": "1",
"title": "",
"parentid": "xi-p-1",
"usergrouppendent": "",
"print_hide": "0",
"flex": "4",
"print_func": "",
"statusdependent": "1",
"dsvalueidx": "2",
"value": "",
"readonly_usergrouppendant": "",
"dstextidx": "1",
"computedwidth": "100%",
"ishidden": "",
"selectlayout": "select",
"checkboxmax": "",
"unitwidth": "60px",
"requiredgroup": "",
"hiddenifclear": "1",
"dstype": "",
"label": "<p>Label</p>",
"cssclasses": [
".your-style"
],
"readonly_statusdependent": "",
"print_break": "0",
"hiddenifcomp": 0,
"attributes": [
{
"value": "value2",
"text": "test2"
}
],
"hiddenif": "",
"comment": "",
"dynamicTrigger": "",
"readonlyif": ""
},
"className": "XSelect"
},
{
"properties": {
"viewstatus": [],
"viewusergroup": [],
"readonlyifcomp": 0,
"readonly_viewusergroup": [],
"hiddenifvalue": "",
"parentid": "xi-p-1",
"rowid": "",
"readonly_viewstatus": [],
"usergrouppendent": "",
"helptext": "",
"flex": "1",
"statusdependent": "",
"id": "xi-btn-1",
"readonlyifvalue": "0",
"readonly_usergrouppendant": "",
"computedwidth": "100%",
"ishidden": "",
"buttons": [
{
"name": "btnPrev",
"action": {
"page": "",
"check": "false",
"value": "not defined",
"optionId": "no action"
},
"title": "",
"value": "back"
},
{
"name": "btnNext",
"action": {
"page": "",
"check": "false",
"value": "not defined",
"optionId": "no action"
},
"title": "",
"value": "next"
},
{
"name": "btnSubmit",
"action": {
"optionId": "submit + check",
"page": "submit",
"check": "true",
"value": "submit + check"
},
"title": "",
"value": "submit"
}
],
"isdisabled": "",
"i18n": {},
"cssclasses": [],
"readonly_statusdependent": "",
"hiddenifcomp": 0,
"name": "btn1",
"textalign": "left",
"attributes": [],
"hiddenif": "",
"comment": "",
"readonlyif": ""
},
"className": "XButtonList"
},
{
"properties": {
"maxwidth": "700px",
"computedwidth": "100%",
"viewstatus": [],
"viewusergroup": [],
"rowid": "",
"cssclasses": [],
"backgroundcolor": "",
"showlogo": "1",
"showrequiredhint": "1",
"usergrouppendent": "",
"minwidth": "300px",
"print_hide": "0",
"statusdependent": "",
"name": "footer1",
"attributes": [],
"comment": "",
"id": "xi-footer-1"
},
"className": "XFooter"
}
]
Enum Constant and Description |
---|
aliasname
Data type:
String
Default: (same as name)
Required for all form elements. |
alt
|
appointmentTemplate
|
attributes
Data type:
JSONArray
Default: (empty array)
Available for all form elements. |
autosize
Data type:
String
Default: 0 . |
backgroundcolor
Data type:
String
Default: (empty string) . |
buttons
|
catalogue
Data type:
String
Default: (empty)
Available only for catalogs plugins (IPluginFormElementCatalogue ). |
catalogueitem
Data type:
String
Default: (empty)
Available only for catalogs plugins (IPluginFormElementCatalogue ). |
cataloguelabel
|
cataloguename
Data type:
String
Default: (empty)
Available only for catalogs plugins (IPluginFormElementCatalogue ). |
catalogueunique
Data type:
String
Default: (empty)
Available only for catalogs plugins (IPluginFormElementCatalogue ). |
characterCount
Data type:
String
Default: 0 . |
checkboxmax
|
checkboxmin
|
checkboxvalue
|
checkedvalue
|
closeable
|
cob2auto
Data type:
String
Default: 0 . |
comment
Data type:
String
Default: (empty string)
Available for all elements. |
computedwidth
|
cssclasses
Data type:
JSONArray
Default: (empty array)
Available for all form elements. |
datasource
|
datatype
|
dateFormat
|
dateFormatCustom
|
datepicker
|
dstextidx
|
dstype
|
dsvalueidx
|
dynamic
Data type:
String
Default: 0
Can be added to input elements to allow marking an element as repeated, i.e. |
dynamicHideButtons
|
dynamicMaxSize
|
dynamicMinSize
|
dynamicTrigger
|
equals
|
fileextension
|
fileoutputalias
|
filepreview
Data type:
String
Default: 0 . |
flex
Data type:
String
Default: 1
Required for all elements that can be arranged horizontally in a row next to other form elements, i.e. |
header
|
height
|
helptext
|
hiddenif
Data type:
String
Default: (no condition) . |
hiddenifclear
|
hiddenifcomp
|
hiddenifvalue
|
i18n
Data type:
JSONObject
Default: (empty object)
Available for all elements. |
id
Data type:
String
Default: (auto-generated)
Required for all form elements. |
image
|
imagegallerie
|
imagegroup
|
imageheight
|
imagelink
|
imagequality
|
imagetarget
|
imagewidth
|
imprintIncludeType
|
imprintShow
|
imprintTemplate
|
isdisabled
Data type:
String
Default: (empty string) . |
ishidden
Data type:
String
Default: (empty string) . |
isreadonly
Data type:
String
Default: (empty string) . |
label
Data type: HTML
String
Default: Label
Available for all form elements that allow a value to be entered. |
labeldir
|
labelwidth
|
legend
|
mask
Data type:
String
Default: 0 . |
maxfilesize
|
maxlength
|
maxvalue
|
maxwidth
|
minlength
|
minvalue
|
minwidth
|
name
Data type:
String
Default: (auto-generated)
Required for all form elements. |
options
|
parentid
Data type:
String
Default: (computed)
Required for all form elements. |
placeholder
|
print_break
Data type:
String
Default: 0
Available for all form elements. |
print_func
|
print_hide
Data type:
String
Default: 0
Available for all form elements. |
print_list
|
print_size
|
print_text_only
|
privacyPolicyIncludeType
|
privacyPolicyShow
|
privacyPolicyTemplate
|
questions
Data type:
JSONArray
Default: (empty array)
Available only for XSelect s when selectlayout is set to either table or table1 (a
table with a list of questions that can be answered with one of the available options . |
readonly_statusdependent
Data type:
String
Default: (empty)
Available for all form elements. |
readonly_usergrouppendant
Data type:
String
Default: (empty)
Available for all form elements. |
readonly_viewstatus
Data type:
JSONArray
Default: (empty array)
Available for all form elements. |
readonly_viewusergroup
Data type:
JSONArray
Default: (empty array)
Available for all form elements. |
readonlyif
Data type:
String
Default: (no condition) . |
readonlyifclear
Data type:
String
Default: (empty string)
Available for all forms element that allow a value to be entered. |
readonlyifcomp
Data type:
String
Default: 0
Available for all forms element that allow a value to be entered. |
readonlyifmode
|
readonlyifvalue
Data type:
String
Default: (empty string)
Available for all forms element that allow a value to be entered. |
required
Data type:
String
Default: 0 . |
requiredgroup
|
requiredif
Data type:
String
Default: (no condition) . |
requiredifcomp
Data type:
String
Default: 0
Available for all forms element that allow a value to be entered. |
requiredifvalue
Data type:
String
Default: (empty string)
Available for all forms element that allow a value to be entered. |
rowid
Data type:
String
Default: (auto-generated)
Required for all form elements. |
rtevalue
|
selectcolumnwidth
Data type:
String
Default: 0 . |
selectlayout
Data type:
String
Default: select . |
selecttextlayout
Data type:
String
Default: right . |
servervalidate
|
showCapacity
|
showlogo
|
showpleaseselect
|
showpleaseselectreq
|
showrequiredhint
|
showUntil
|
statusdependent
Data type:
String
Default: (empty)
Available for all form elements. |
subheader
|
textalign
|
title
|
unit
Data type:
String
Default: (empty string)
Available for XTextArea s, XTextField s, XUpload s and XSelect s. |
unitwidth
|
usergrouppendent
Data type:
String
Default: (empty)
Available for all form elements. |
value
|
viewstatus
Data type:
JSONArray
Default: (empty array)
Available for all form elements. |
viewusergroup
Data type:
JSONArray
Default: (empty array)
Available for all form elements. |
vrule
|
vrulemismatch
|
Modifier and Type | Method and Description |
---|---|
static boolean |
contains(String name) |
Class<?> |
getClazz() |
Serializable |
getDefaultValue() |
static XPropertyEnum |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static XPropertyEnum[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final XPropertyEnum parentid
public static final XPropertyEnum rowid
String
Default: (auto-generated)
Required for all form elements. This is the ID of the horizontal row (.xm-form-row
) which contains the form
element, if any. This property cannot be edited in the designer directly. When a form element is not placed in a
row next to other form elements, its row ID is empty.
public static final XPropertyEnum showpleaseselect
public static final XPropertyEnum showpleaseselectreq
public static final XPropertyEnum showlogo
public static final XPropertyEnum showrequiredhint
public static final XPropertyEnum privacyPolicyShow
public static final XPropertyEnum privacyPolicyTemplate
public static final XPropertyEnum privacyPolicyIncludeType
String
Default: dialog
Applies only to form elements of type XFooter
. Determines how to include the selected privacy policy
template (privacyPolicyTemplate
). Possible values are dialog
, _blank
and inline
.
public static final XPropertyEnum imprintShow
String
Default: 0
Applies only to form elements of type XFooter
. If set to 1
, the selected imprint will be shown as a
link or inline in the footer (see imprintIncludeType
).
public static final XPropertyEnum imprintTemplate
public static final XPropertyEnum imprintIncludeType
String
Default: dialog
Applies only to form elements of type XFooter
. Determines how to include the selected imprint template
(imprintTemplate
). Possible values are dialog
, _blank
and inline
.
public static final XPropertyEnum name
String
Default: (auto-generated)
Required for all form elements. This is the name of a form element, as it can be edited in the Designer. It
identifiers a form element and is used in placeholders and when accessing form elements via JavaScript. The name
may contains only letters (a-z
, A-Z
), numbers (0-9
), and underscore (_
). The name
should be unique across all form element of a form, but does not need to be.
public static final XPropertyEnum aliasname
String
Default: (same as name)
Required for all form elements. This is the alias of a form element, as it can be edited in the designer. By default, the alias is set to the name of the form element. Compared with the name, the alias may contain any character. It can be used in placeholders, and for addressing third-party system that require a particular name. The alias, if set, needs to be unique across all form elements of a form.
public static final XPropertyEnum id
String
Default: (auto-generated)
Required for all form elements. This is a unique ID of a form element and is generated automatically. Currently,
IDs are of the form xi-[type]-[index]
, e.g. xi-tf-7
for input fields or xi-sel-9
for select
fields.
public static final XPropertyEnum header
public static final XPropertyEnum subheader
public static final XPropertyEnum maxwidth
String
Default: 700px
Applies only to form elements of type XHeader
, XPage
, and XFooter
. This is the maximum
width of the header, page, or footer, as a CSS unit. If the browser viewport is larger than this width, the header,
page, or footer takes this maximum width, leaving white or grey borders around the form.
public static final XPropertyEnum minwidth
String
Default: 300px
Applies only to form elements of type XHeader
, XPage
, and XFooter
. This is the minimum
width of the header, page, or footer, as a CSS unit. If the browser viewport smaller than this width, the form is
displayed in responsive mode. This includes, for example, rearranging horizontal form elements vertically.
public static final XPropertyEnum imageheight
public static final XPropertyEnum imagewidth
public static final XPropertyEnum height
public static final XPropertyEnum autosize
String
Default: 0
.
Available for all textarea elements that allow to resize the field, to a size it needs to show the whole content.
If set to 0
, the form element will not be resized.
public static final XPropertyEnum characterCount
String
Default: 0
.
Available for XTextArea
s and other input elements that should display the number of entered characters.
When set to 1
, the number characters the user has entered is displayed below the textarea. If
maxlength
is larger than 0
, the maximum number of characters allowed is displayed as well.
Otherwise, when set to 0
, no character count is shown.
public static final XPropertyEnum computedwidth
String
Default: 100%
Required for all form elements for which flex
is required. This is a computed property that is filled
automatically and cannot be edited in the designer directly. When multiple form elements are arranged horizontally
in row, this property contains the computed relative width of the form element, in percent. When there is only one
element in a row, this defaults to 100%
.
public static final XPropertyEnum selectlayout
String
Default: select
.
Applies to select form elements (XSelect
). Indicates how the select element is rendered, e.g. as a list of
checkboxes or an HTML SELECT element. Supported values are currently
size="5"
attribute. Only one option can be selected at any given time.checkboxmin
and checkboxmax
, which control how many
options can be selected at once. The checkboxes may be displayed in multiple rows when no more space is available
on the first row.checkboxmin
and checkboxmax
, which control how many
options can be selected at once.questions
is shown as a row of the table, with one column for each available answer (see
options
). Allows the user to select multiple answer per question.questions
is shown as a row of the table, with one column for each available answer (see
options
). Only allows the user to select one answer per question.public static final XPropertyEnum cob2auto
String
Default: 0
.
Only available for XSelect
items with the property selectlayout
set to select
. When this
property is set to 1
, the SELECT element is transformed into a text input field that features auto
completion as the user types. The suggested items are the options
of the SELECT element.
public static final XPropertyEnum selecttextlayout
String
Default: right
.
Only available for XSelect
items with the property selectlayout
set to one of checkbox
,
checkbox1
, radio
or radio1
. Controls the position where the label text is shown for each
checkbox or radio button. The following values are supported currently:
public static final XPropertyEnum selectcolumnwidth
String
Default: 0
.
Only available for XSelect
items with the property selectlayout
set to one of checkbox
,
radio
, table
or table1
. This property specifies the width (in pixels) of each option with a
checkbox or radio button and the label text. Defaults to 0
, which computes a width automatically.
public static final XPropertyEnum ishidden
String
Default: (empty string)
.
Available for all elements other than XPage
, XHeader
and XFooter
. Controls whether the
element is visible (when set 1
) or hidden (when set to 0
or the empty string). An element that is
hidden is still present in the DOM, but hidden via CSS. See readonly_viewstatus
and
readonly_viewusergroup
, which remove form elements completely for certain states or user groups. See
hiddenif
to hide or show elements dynamically, depending on the value of some other form
element.
public static final XPropertyEnum isreadonly
String
Default: (empty string)
.
Available for form elements of type XTextField
and XTextField
. Controls whether the value of the
form element can be modified by the user. The following values are supported currently:
disabled
HTML
attribute, which does not submit the current value of the form element when the form is submitted.readonly
HTML
attribute, which still submits the current value of the form element when the form is submitted.public static final XPropertyEnum isdisabled
String
Default: (empty string)
.
Available for all form input elements other than XTextField
and XTextArea
, such as XSelect
and XCheckbox
. If set to 0
or the empty string, the user can modify the value of the form input
element normally. When set to 1
, the user cannot edit or modify the value of the form input element. This
makes use of the disabled
HTML attribute, which does not submit the current value of the form element when
the form is submitted.
public static final XPropertyEnum filepreview
String
Default: 0
.
Available only for form elements of type XUpload
. When set to 1
and the user select a file for the
upload element, a small preview of that file is shown next to the upload element. When it is an image file, a
thumbnail of that image is shown. Otherwise, a generic icon for the type of file is shown. When set to 0
,
no preview is shown.
public static final XPropertyEnum mask
String
Default: 0
.
Available only for form elements of type XTextField
. When set to 1
, the value entered by the user
is masked or obfuscated, usually used for password input fields. Otherwise, when set to 0
, the value is
shown normally.
public static final XPropertyEnum backgroundcolor
String
Default: (empty string)
.
Available for container elements such as XHeader
, XPage
, XFooter
, XContainer
, and
XFieldSet
. This sets the background color of the container elements. When set to the empty string, no
background color is used (transparent
). Can be any valid CSS color specifier, such as red
,
rgb(112,93,0)
, or #666
.
public static final XPropertyEnum hiddenif
String
Default: (no condition)
.
Available for all elements other than XPage
, XHeader
and XFooter
. A form element can be
hidden automatically based on the value of another form element. This the ID of the other (referenced) form
element. When the value of this property is empty, the form element is not hidden automatically.
public static final XPropertyEnum hiddenifcomp
String
Default: 0
Available for all elements other than XPage
, XHeader
and XFooter
. A form element can be
hidden automatically based on the value of another form element. This is the condition applied to the value of the
other form element. Available condition types are:
hiddenifvalue
.hiddenifvalue
.hiddenifvalue
.hiddenifvalue
.hiddenifvalue
.hiddenifvalue
.
The hiddenifvalue
must be a range in the format x-y
, e.g. 2-37
.hiddenifvalue
.hiddenifvalue
.public static final XPropertyEnum hiddenifvalue
String
Default: (empty string)
Available for all elements other than XPage
, XHeader
and XFooter
. A form element can be
hidden automatically based on the value of another form element. This is the value against which the other form
element is compared. Whether this property is required and what it must contain depends on the selected condition,
see hiddenifcomp
for further details.
public static final XPropertyEnum hiddenifclear
String
Default: (empty string)
Available for all elements other than XPage
, XHeader
and XFooter
. A form element can be
hidden automatically based on the value of another form element. This is a flag that indicates whether the form
element is cleared when it is hidden. Can be set to one of the following options:
value
for XTextField
s, XTextArea
s, and XSelect
s; and checkedvalue
for
XCheckbox
espublic static final XPropertyEnum required
String
Default: 0
.
Available for all forms element that allow a value to be entered. If set to 0
, the form element is not
required and can be left empty. Otherwise, if set to 1
, the form element is required and a value must be
entered.
public static final XPropertyEnum requiredif
String
Default: (no condition)
.
Available for all forms element that allow a value to be entered. A form element can be made a required field automatically based on the value of another form element. This the ID of the other (referenced) form element. When the value of this property is empty, the form element is not made a required field automatically.
public static final XPropertyEnum requiredifcomp
String
Default: 0
Available for all forms element that allow a value to be entered. A form element can be made a required field automatically based on the value of another form element. This is the condition applied to the value of the other form element. Available condition types are:
requiredifvalue
.requiredifvalue
.requiredifvalue
.requiredifvalue
.requiredifvalue
.requiredifvalue
. The requiredifvalue
must be a range in the format x-y
, e.g.
2-37
.requiredifvalue
.requiredifvalue
.public static final XPropertyEnum requiredifvalue
String
Default: (empty string)
Available for all forms element that allow a value to be entered. A form element can be made a required field
automatically based on the value of another form element. This is the value against which the other form element is
compared. Whether this property is required and what it must contain depends on the selected condition, see
requiredifcomp
for further details.
public static final XPropertyEnum readonlyif
String
Default: (no condition)
.
Available for all forms element that allow a value to be entered. A form element can be disabled automatically based on the value of another form element. When a form field is disabled, its value cannot be changed anymore. This the ID of the other (referenced) form element. When the value of this property is empty, the form element is not disabled field automatically.
public static final XPropertyEnum readonlyifcomp
String
Default: 0
Available for all forms element that allow a value to be entered. A form element can be disabled automatically based on the value of another form element. When a form field is disabled, its value cannot be changed anymore. This is the condition applied to the value of the other form element. Available condition types are:
readonlyifvalue
.readonlyifvalue
.readonlyifvalue
.readonlyifvalue
.readonlyifvalue
.readonlyifvalue
. The readonlyifvalue
must be a range in the format x-y
, e.g.
2-37
.readonlyifvalue
.readonlyifvalue
.public static final XPropertyEnum readonlyifvalue
String
Default: (empty string)
Available for all forms element that allow a value to be entered. A form element can be disabled automatically
based on the value of another form element. When a form field is disabled, its value cannot be changed anymore.
This is the value against which the other form element is compared. Whether this property is required and what it
must contain depends on the selected condition, see readonlyifcomp
for further details.
public static final XPropertyEnum readonlyifclear
String
Default: (empty string)
Available for all forms element that allow a value to be entered. A form element can be disabled automatically based on the value of another form element. When a form field is disabled, its value cannot be changed anymore. This is a flag that indicates whether the form element is cleared when it is disabled. Can be set to one of the following options:
value
for XTextField
s, XTextArea
s, and XSelect
s; and
checkedvalue
for XCheckbox
espublic static final XPropertyEnum readonlyifmode
String
Default: 2
Available only for XTextField
s and XTextArea
s. A form element can be disabled automatically based
on the value of another form element. When a form field is disabled, its value cannot be changed anymore. When this
property is set to 1
, the current value of the disabled text input field is discarded and not submitted to
the server. This corresponds to the HTML disabled
attribute. Otherwise, when set to 2
, the value is
submitted to the server. This corresponds to the HTML attribute readonly
.
Please note that this property is not available for other form elements as the readonly
HTML attribute is
supported only by INPUT elements.
public static final XPropertyEnum label
String
Default: Label
Available for all form elements that allow a value to be entered. This is the text of the label indicating the
purpose of the form field. Please note that this property is interpreted as an HTML snippet, so special characters
such as angle brackets (<>
) need to be escaped.
public static final XPropertyEnum labeldir
String
Default: top
Available for all elements that admit the label
property. Indicates the position where the label is
placed, relative to the form field. Available options are:
public static final XPropertyEnum labelwidth
public static final XPropertyEnum legend
public static final XPropertyEnum textalign
String
Default: left
Available for XButtonList
s and XImage
s. Indicates how the buttons or the image should be aligned.
May be one of left
(left alignment), center
(centered), or right
(right alignment).
public static final XPropertyEnum unitwidth
public static final XPropertyEnum unit
String
Default: (empty string)
Available for XTextArea
s, XTextField
s, XUpload
s and XSelect
s. An optional text that
is shown to the right of the form element. A common use case is displaying a unit such as kg
or
liter
next to a text input field.
public static final XPropertyEnum placeholder
String
Default: (empty string)
Available for XTextField
s and XTextArea
s. This is an optional placeholder text that is displayed
when no value was entered in the input field. This property usually corresponds to the HTML attribute
placeholder
.
public static final XPropertyEnum title
String
Default: (empty string)
Available for all form elements that allow a value to be entered and also for XImage
s. This is an optional
title that is displayed as a tooltip when the user hover over the element with the mouse cursor. This property
usually corresponds to the HTML attribute title
.
public static final XPropertyEnum alt
public static final XPropertyEnum helptext
String
Default: (empty string)
Available for all elements other that XHeader
, XPage
s, and XFooter
. This is an optional
informative description that is displayed when the user hovers over the help icon located next to the form element.
Please note that this property is interpreted as an HTML snippet, so special characters such as angle brackets
(<>
) need to be escaped.
public static final XPropertyEnum comment
String
Default: (empty string)
Available for all elements. This is an optional comment that is shown only in the designer and does not affect the rendered form in any way. This is usually used for internal comments when designing a form.
public static final XPropertyEnum value
String
Default: (empty string)
Available for XTextField
s, XTextArea
s, and XSelect
s. This property contains the initial
value of the corresponding HTML INPUT or SELECT element. This initial value is set when the form is opened for the
first time. By default, input fields and select elements are empty and do not have a value initially.
public static final XPropertyEnum rtevalue
public static final XPropertyEnum buttons
JSONArray
Default: (empty array)
Available only for XButtonList
s. This property contains the list of buttons that are displayed. The list is
a JSON array, where each entry represents a button. Each button is a JSONObject
with the properties as
described below.
Click to show example for the value of the buttons property
[
{
"optionId": "p1",
"page": "p1",
"check": "false",
"value": "Pagina p1"
},
{
"optionId": "p1 + check",
"page": "p1",
"check": "true",
"value": "Pagina p1 + controle"
},
{
"optionId": "submit + check",
"page": "submit",
"check": "true",
"value": "Verwerken + controle"
},
{
"optionId": "submit",
"page": "submitNoCheck",
"check": "false",
"value": "Verwerken"
},
{
"optionId": "submit no save",
"page": "submitPreview",
"check": "false",
"value": "Indienen"
},
{
"optionId": "submit no save popup",
"page": "submitPreviewWindowed",
"check": "false",
"value": "Indienen + popup"
},
{
"optionId": "save + check",
"page": "submitSave",
"check": "true",
"value": "Bewaren + controleren"
},
{
"optionId": "save",
"page": "submitSaveNoCheck",
"check": "false",
"value": "Bewaren"
},
{
"page": "-1",
"check": "false",
"value": "Geen actie",
"optionId": "no action"
}
]
String
)name
attribute of the button. Please note that
this is not the text that is displayed to the user (for that, see value
)String
)String
)JSONObject
)JSONObject
with the following properties:
String
)true
to indicate the current page should be validated when the button is pressed, or
false
otherwise.String
)page p1
or Verwerken + controle
. Please note that this value depends on the
selected language and should not be used by code to check the action.String
)submitPreview
, but displays the response from the
server in a popup window.check
.String
)submitPreview
, but displays the response from the server
in a popup window.p1 + check
or pCarDetails + check
.p1
or pCarDetails
.public static final XPropertyEnum options
JSONArray
Default: (empty array)
Available only for XSelect
s. This property contains the list of options for the select element. It must be
a JSON array with one entry for each option. Each entry is a JSONObject
with the following properties:
String
)String
)String
)public static final XPropertyEnum questions
JSONArray
Default: (empty array)
Available only for XSelect
s when selectlayout
is set to either table
or table1
(a
table with a list of questions that can be answered with one of the available options
. This property
contains the list of available questions, as a JSONArray
. Each entry of the JSON array must be a
JSONObject
with the following properties:
public static final XPropertyEnum checkedvalue
public static final XPropertyEnum checkboxvalue
public static final XPropertyEnum image
public static final XPropertyEnum imagelink
public static final XPropertyEnum imagetarget
public static final XPropertyEnum imagegallerie
public static final XPropertyEnum imagegroup
public static final XPropertyEnum imagequality
public static final XPropertyEnum datasource
public static final XPropertyEnum appointmentTemplate
String
Default: (empty string)
Available only for XAppointment
s. The UUID of an appointment template to be used for booking appointment
and finding free dates. When no appointment template is set, no appointments can be booked.
public static final XPropertyEnum dstype
String
Default: (empty string)
Available only for XSelect
s. The type of the data source that is used for the select options. Must be one
of the following:
options
.public static final XPropertyEnum dstextidx
String
Default: 1
Available only for XSelect
s. When a datasource
is set: The 1-based index of the column that
contains the text of the select option that is shown to the user.
public static final XPropertyEnum dsvalueidx
String
Default: 2
Available only for XSelect
s. When a datasource
is set: The 1-based index of the column that
contains the value of the select option that sent to the server when the form is submitted.
public static final XPropertyEnum datepicker
String
Default: 1
Available only for XTextField
s. Applies only when datatype
is set to a date-like data type, such
as dateDE
or dateEN
. If this attribute is set to 1
, a date picker UI widget is shown in the
form that lets the user pick a date more easily. Otherwise, when set to 0
, no date picker is shown,
requiring the user to enter a date in a text input field.
public static final XPropertyEnum datatype
String
Default: text
Available only for XTextField
s and XTextArea
s. The data type is used during form validating to
ensure the entered data conforms to a certain format. The following built-in data types are currently available:
22.05.1990
.
james@john.org
or θσερ@εχαμπλε.ψομ
.
3
, 0
, or -21
.
127.0.0.1
or 10.42.42.13
.
2,00
,
-3,95
, 0,00
or 897345,38
.
0.03
,, -99.2
, or 42
.
0234995483
or +49 351 4459654
.
02349
. Does not check whether such a code
is actually registered within Germany.
0
, 3
, oder 123
.
0,00
or
2,34
.
0,00
, 0
, 3,4
, or 3
.
vrule
.
hh:mm
, e.g. 22:05
or 03:42
.
http://example.com
or https://www.james.org
.
public static final XPropertyEnum showCapacity
String
Default: 0
Available only for XAppointment
s. Describes if the amount of free appointments slots (capacity) should be
appear in the appointment picker."
public static final XPropertyEnum showUntil
String
Default: 0
Available only for XAppointment
s. Describes if the end time should be appear in the appointment picker."
public static final XPropertyEnum closeable
String
Default: 0
Available only for XAppointment
s. Describes if appointment picker can be closed an appear as usual input
field."
public static final XPropertyEnum dateFormat
String
Default: dd.mm.yy
Available only for XAppointment
s. Describes the format dates will appear in the appointment picker. "Custom
means the Property dateFormatCustom will be used."
public static final XPropertyEnum dateFormatCustom
String
Default: dd.mm.yy
Available only for XAppointment
s. Describes the format dates will appear in the appointment picker when
dateFormat equals "Custom".
public static final XPropertyEnum requiredgroup
String
Default: (empty)
Available for all elements that support required
. The required group to which the form field belongs. If a
form element is part of a required group, the form is invalid when no element of the required group has a value.
The form becomes valid once the user has filled in at least one form field of the required groups.
public static final XPropertyEnum vrule
String
Default: (empty)
Applicable when datatype
was set to regexp
. This is the regular expression that is used to
validate the form field. This must be a valid JavaScript regular expression. Usually it is recommend to use the
anchors ^...$
to ensure the whole input conforms to the pattern.
public static final XPropertyEnum maxlength
String
Default: 255
Available for XTextField
s, XTextArea
s, and XUpload
s. The maximum length of the input that
is allowed. If set to 0
, the length is unlimited. For XTextField
s and XTextArea
s, the
length of the entered text is checked. For XUpload
s, the length of the file name is checked.
minlength
,
maxfilesize
public static final XPropertyEnum minlength
String
Default: 0
Available for XTextField
s and XTextArea
s. The minimum number of characters that must be entered in
a text field or text area. Please note that this restriction is applied only when the form field is not empty.
Thus, when set to 0
, the form field is never invalid due to this property. To enforce that the user does
not leave the form field empty, use required
.
public static final XPropertyEnum minvalue
String
Default: (empty)
Applicable when datatype
is set to a numerical data type, such as integer
. The minimum numerical
value (inclusive) that must be entered. Contrast this with minlength
, which checks the number of
characters, not the numerical value these characters represent. When empty, no restriction is applied.
public static final XPropertyEnum maxvalue
String
Default: (empty)
Applicable when datatype
is set to a numerical data type, such as integer
. The maximum numerical
value (inclusive) that must be entered. Contrast this with maxlength
, which checks the number of
characters, not the numerical value these characters represent. When empty, no restriction is applied.
public static final XPropertyEnum checkboxmin
String
Default: (empty)
Available only for XSelect
. Applies only when selectlayout
is set to radio
,
radio1
, checkbox
, checkbox1
, table
, or table1
. The minimum number of
checkboxes or radio buttons that must be checked or selected. When empty, no restriction is applied.
checkboxmax
public static final XPropertyEnum checkboxmax
String
Default: (empty)
Available only for XSelect
. Applies only when selectlayout
is set to radio
,
radio1
, checkbox
, checkbox1
, table
, or table1
. The maximum number of
checkboxes or radio buttons that must be checked or selected. When empty, no restriction is applied.
checkboxmin
public static final XPropertyEnum maxfilesize
public static final XPropertyEnum equals
String
Default: (empty)
Only available for XTextField
s and XTextArea
s currently. When not empty, this property refers to
the id
of another form field that must have the same value as the form field. The form field is invalid if
the value of the form field is different compared to the value of the referenced form field.
public static final XPropertyEnum fileextension
String
Default: (empty)
Available only for XUpload
s. A comma separated list of file extensions (without the leading period) an
uploaded file must have, such as xml,js
. An upload field is invalid if a file with a different file
extension is selected. When empty, all extensions are allowed.
public static final XPropertyEnum fileoutputalias
public static final XPropertyEnum vrulemismatch
String
Default: (empty)
Applicable when datatype
was set to regexp
. This is the message that is displayed to the user when
the value of a form field does not matched the vrule
regular expression. If not set, a generic error
message is displayed.
vrule
public static final XPropertyEnum servervalidate
String
Default: (empty)
Available for all elements that submit a value (IXValuableItem
). When set to 1
, the value submitted
for the form field is validated on the server. Otherwise, no server-side validation is performed. Use
IXItemBasic.validate(de.xima.fc.form.common.models.IXValidationParams)
and
IXItemBasic.validateGlobal(de.xima.fc.form.common.models.IXGlobalValidationParams)
to customize how form
element widgets are validated.
public static final XPropertyEnum flex
String
Default: 1
Required for all elements that can be arranged horizontally in a row next to other form elements, i.e.
XButtonList
, XCheckbox
, XContainer
, XFieldSet
, XImage
, XLine
,
XSelect
, XSpacer
, XSpan
, XTextArea
, XTextField
, and XUpload
. This
is the relative width as a dimensionless number that can also be edited in the designer. The computedwidth
is calculated by taking the ration of this property and dividing by the sum of the flex
values of all
items in the same row.
public static final XPropertyEnum catalogue
String
Default: (empty)
Available only for catalogs plugins (IPluginFormElementCatalogue
). The (not necessarily unique) ID of the
catalog.
public static final XPropertyEnum cataloguename
String
Default: (empty)
Available only for catalogs plugins (IPluginFormElementCatalogue
). Either just the catalog ID or a human
readable name of the catalog.
public static final XPropertyEnum catalogueitem
String
Default: (empty)
Available only for catalogs plugins (IPluginFormElementCatalogue
). The ID of an item in the catalog.
public static final XPropertyEnum catalogueunique
String
Default: (empty)
Available only for catalogs plugins (IPluginFormElementCatalogue
). An arbitrary, unique ID for the catalog.
public static final XPropertyEnum cataloguelabel
String
Default: Label
Available only for catalogs plugins (IPluginFormElementCatalogue
). The label of the catalog that is shown
in the UI.
public static final XPropertyEnum dynamic
String
Default: 0
Can be added to input elements to allow marking an element as repeated, i.e. XContainer
, XFieldSet
,
XSelect
, XTextArea
, XTextField
, and XUpload
. When set to 1
, the element is
repeated and the user can use the plus and minus buttons to create one or multiple copies of the form element.
Otherwise, when set to 0
, the element cannot be repeated.
public static final XPropertyEnum dynamicMinSize
public static final XPropertyEnum dynamicMaxSize
public static final XPropertyEnum dynamicTrigger
String
Default: (empty)
Required for all elements that have the property dynamic
enabled. This property can be edited in the
designer only when dynamic
is activated. This is the id
of another form element whose value
controls the number of repetitions of this element. For example, when the dynamic trigger is set to another
XTextField
and the user enters 4
in that text field, this will cause this element to have 4
repetitions (either by adding new repetitions or removing existing repetitions).
public static final XPropertyEnum dynamicHideButtons
String
Default: (empty)
Required for all elements that have the property dynamic
enabled. This property can be edited in the
designer only when dynamic
is activated. When this property is set to 1
, the plus and minus
buttons for adding and removing repetitions are hidden. Otherwise, when set to 0
, the buttons are shown
normally. Hiding the buttons may be useful when the number of repetitions should be controlled only by the
dynamicTrigger
.
public static final XPropertyEnum cssclasses
JSONArray
Default: (empty array)
Available for all form elements. A list of additional classes that are added to the form element (not its container element). Each entry in this array must a string representing the CSS class to be added.
public static final XPropertyEnum attributes
JSONArray
Default: (empty array)
Available for all form elements. A list of custom HTML attributes that are added to the rendered form element (not its container element). Each entry in this array must be an object with the following properties:
data-my-custom-attribute
.data-
.public static final XPropertyEnum i18n
JSONObject
Default: (empty object)
Available for all elements. Contains a list of translations for all translatable properties. A form is always
requested in a particular language. When a translation for that language is available, it is used. Otherwise, the
default value of the corresponding XPropertyEnum
is used.
The keys of this object are language tags, such as de
or en
. Each value is another
JSONObject
with the property name (Enum.name()
) as the key and the translated text as the
value. For example, this could look as follows:
{ "de": { "label": "<p>German label</p>\n", "helptext": "<p>German help</p>\n", "placeholder": "German placeholder" }, "fr": { "label": "<p>French label</p>\n", "helptext": "<p>French help</p>\n", "placeholder": "French placeholder" } }This would define a German and French value for the
label
, helptext
, and placeholder
properties.public static final XPropertyEnum statusdependent
String
Default: (empty)
Available for all form elements. When set to 1
, the form element is available only when the form record is
currently in one of the states as indicated by viewstatus
.
public static final XPropertyEnum viewstatus
JSONArray
Default: (empty array)
Available for all form elements. Applicable only when statusdependent
is set to 1
. A list of state
descriptors of which at least one must match the current state of the form record. When no state descriptor
matches, the form element is not available, i.e. it is not included in the rendered form and no values for that
form element are accepted when the form is submitted. A state descriptor is a string that is either
-1
, which matches every state, or[!]
, in which case it matches when the form record is not in that
state. For example, if this property is set to ["[!]-1", "Received"]
, the form element is available if the
form record has no state, the form record is in the state Received
, or both conditions apply.public static final XPropertyEnum usergrouppendent
String
Default: (empty)
Available for all form elements. When set to 1
, the form element is available only when the user belongs to
one of the user groups as as indicated by viewusergroup
.
public static final XPropertyEnum viewusergroup
JSONArray
Default: (empty array)
Available for all form elements. Applicable only when usergrouppendent
is set to 1
. A list of user
group descriptors of which at least one must match one of the user groups of the user who opened the form. When no
user group descriptor matches, the form element is not available, i.e. it is not included in the rendered form and
no values for that form element are accepted when the form is submitted. A user group descriptor is a string that
is either
-1
, which matches every user group, or[!]
, in which case it matches when the user does not belong to
that user group. For example, if this property is set to ["[!]-1", "Admin"]
, the form element is available
if user does not belong to any group, the user belongs to the user group Admin
, or both conditions apply.public static final XPropertyEnum readonly_statusdependent
String
Default: (empty)
Available for all form elements. When set to 1
, the form element is editabble only when the form record is
currently in one of the states as indicated by readonly_viewstatus
.
public static final XPropertyEnum readonly_viewstatus
JSONArray
Default: (empty array)
Available for all form elements. Applicable only when readonly_statusdependent
is set to 1
. A list
of state descriptors of which at least one must match the current state of the form record. When no state
descriptor matches, the form element is not editable, i.e. it is included in the rendered form, but its value
cannot be changed. Please note that this is not checked by the server currently. A state descriptor is a string
that is either
-1
, which matches every state, or[!]
, in which case it matches when the form record is not in that
state. For example, if this property is set to ["[!]-1", "Received"]
, the form element is editable if the
form record has no state, the form record is in the state Received
, or both conditions apply.public static final XPropertyEnum readonly_usergrouppendant
String
Default: (empty)
Available for all form elements. When set to 1
, the form element is editable only when the user belongs to
one of the user groups as as indicated by readonly_viewusergroup
.
public static final XPropertyEnum readonly_viewusergroup
JSONArray
Default: (empty array)
Available for all form elements. Applicable only when readonly_usergrouppendant
is set to 1
. A
list of user group descriptors of which at least one must match one of the user groups of the user who opened the
form. When no user group descriptor matches, the form element is not editable, i.e. it is included in the rendered
form, but its value cannot be edited. Please note that this is not checked by the server currently. A user group
descriptor is a string that is either
-1
, which matches every user group, or[!]
, in which case it matches when the user does not belong to
that user group. For example, if this property is set to ["[!]-1", "Admin"]
, the form element is editable
if user does not belong to any group, the user belongs to the user group Admin
, or both conditions apply.public static final XPropertyEnum print_hide
String
Default: 0
Available for all form elements. Controls whether the form element is shown when the form is printed. When
0
, the form element is included in the printed version; and omitted when this property is set to 1
.
"Printed" here currently only refers to the PDF or Microsoft Word export.
public static final XPropertyEnum print_list
String
Default: 1
Available only for XSelect
s. Controls the layout of the select element when the form is printed. There are
two ways how a select element can be rendered in the printed version. As an empty text field the user can fill out
manually. Or as a list of predefined options with a checkbox where the user can put a check mark.
When set to 1
, a list of options is always used. When set to 2
, a text field is used. Otherwise,
when set to 0
, the output style is determined automatically based on the number of options: a list of
options if there are less than 10
options, or a text field otherwise.
"Printed" here currently only refers to the PDF or Microsoft Word export.
public static final XPropertyEnum print_text_only
String
Default: 1
Available for all elements with a (label) text, such as XCheckbox
es, XSelect
s, XSpan
s,
XTextArea
s, and XTextField
s. Controls whether HTML markup is allowed. When set 1
, all HTML
tags are removed and only the text content is used.
"Printed" here currently only refers to the PDF or Microsoft Word export.
public static final XPropertyEnum print_func
String
Default: (empty)
Available for all elements with a value (IXValuableItem
). When not empty, the value of this property is
interpreted as a Word fill function that is written to the exported Word document. That Microsoft Word document can
then be used with a workflow action of type Word fill
. When the word document is filled with the submitted
form data, the Word fill function is evaluated. For example, you can enter rmr()
or .rmr()
(with or
without the leading period) to remove the table row with the current element in case its value is empty.
"Printed" here currently only refers to the PDF or Microsoft Word export.
public static final XPropertyEnum print_break
String
Default: 0
Available for all form elements. Controls whether a page break is inserted in the printed version. Can be one of the following values:
"Printed" here currently only refers to the PDF or Microsoft Word export.
public static final XPropertyEnum print_size
String
Default: (empty)
Available for all elements with a (label) text or value text, such as XCheckbox
es, XSelect
s,
XSpan
s, XTextArea
s, and XTextField
s. Controls the font size of the text. This is
interpreted as a font size in points (not pixels). When no value is set, an appropriate default is used.
"Printed" here currently only refers to the PDF or Microsoft Word export.
public static XPropertyEnum[] values()
for (XPropertyEnum c : XPropertyEnum.values()) System.out.println(c);
public static XPropertyEnum valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic Class<?> getClazz()
String
or JSONArray
.public Serializable getDefaultValue()
public static boolean contains(String name)
name
- The name of a property to check.true
if an XPropertyEnum
with the given name exists, or false
otherwise.Copyright © 2020 XIMA MEDIA GmbH. All rights reserved.