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 |
autosize
Data type:
String
Default: 0 . |
backgroundcolor
Data type:
String
Default: (empty string) . |
buttons
|
catalogue |
catalogueitem |
cataloguelabel |
cataloguename |
catalogueunique |
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 |
datasource
|
datatype |
dateFormat
|
dateFormatCustom
|
datepicker |
dstextidx
|
dstype
|
dsvalueidx
|
dynamic
Data type:
String
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
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 |
id
Data type:
String
Default: (auto-generated)
Required for all form elements. |
image
|
imagegallerie
|
imagegroup
|
imageheight
|
imagelink
|
imagequality
|
imagetarget
|
imagewidth
|
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 |
print_func |
print_hide |
print_list |
print_size |
print_text_only |
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 |
readonly_usergrouppendant |
readonly_viewstatus |
readonly_viewusergroup |
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 |
subheader
|
textalign
|
title
|
unit
Data type:
String
Default: (empty string)
Available for XTextArea s, XTextField s, XUpload s and XSelect s. |
unitwidth
|
usergrouppendent |
value
|
viewstatus |
viewusergroup |
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 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
public static final XPropertyEnum datatype
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
public static final XPropertyEnum vrule
public static final XPropertyEnum maxlength
public static final XPropertyEnum minlength
public static final XPropertyEnum minvalue
public static final XPropertyEnum maxvalue
public static final XPropertyEnum checkboxmin
public static final XPropertyEnum checkboxmax
public static final XPropertyEnum maxfilesize
public static final XPropertyEnum equals
public static final XPropertyEnum fileextension
public static final XPropertyEnum fileoutputalias
public static final XPropertyEnum vrulemismatch
public static final XPropertyEnum servervalidate
public static final XPropertyEnum flex
String
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
public static final XPropertyEnum cataloguename
public static final XPropertyEnum catalogueitem
public static final XPropertyEnum catalogueunique
public static final XPropertyEnum cataloguelabel
public static final XPropertyEnum dynamic
String
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
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
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
public static final XPropertyEnum attributes
public static final XPropertyEnum i18n
public static final XPropertyEnum statusdependent
public static final XPropertyEnum viewstatus
public static final XPropertyEnum usergrouppendent
public static final XPropertyEnum viewusergroup
public static final XPropertyEnum readonly_statusdependent
public static final XPropertyEnum readonly_viewstatus
public static final XPropertyEnum readonly_usergrouppendant
public static final XPropertyEnum readonly_viewusergroup
public static final XPropertyEnum print_hide
public static final XPropertyEnum print_list
public static final XPropertyEnum print_text_only
public static final XPropertyEnum print_func
public static final XPropertyEnum print_break
public static final XPropertyEnum print_size
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 static boolean contains(String name)
public Class<?> getClazz()
public Serializable getDefaultValue()
Copyright © 2020 XIMA MEDIA GmbH. All rights reserved.