Common Attributes
autocapitalize
Sets the autocapitalize
HTML attribute. It is used to define whether the text entered by the user should be automatically capitalized or not.
autocomplete
Sets the autocomplete
HTML attribute for indicating whether the value of this component can be automatically completed by the browser.
autofocus
Specify that the component should have input focus when the page loads.
Possible values are true
, false
. By default, all components are not focused.
dataContainer
Sets a data container defined in the data
section of the screen XML descriptor.
When you set some instance container as a value of the dataContainer
attribute, you should also set the property
attribute.
datatype
Sets a data type of the component’s content. Possible values:
-
boolean
-
byteArray
-
char
-
date
-
dateTime
-
decimal
-
double
-
fileRef
-
int
-
localDate
-
localDateTime
-
localTime
-
long
-
offsetDateTime
-
offsetTime
-
string
-
time
-
uri
-
uuid
height
Sets the height of the component.
The height should be in a format understood by the browser, for example, "100px"
or "2.5em"
.
helperText
Defines a text adjacent to the field that can be used, for example, to inform to the users which values it expects.
id
An identifier of the component.
It is recommended to create identifiers according to the rules for Java identifiers and use camelŠ”ase, for example: userGrid
, filterPanel
. The id
attribute can be specified for any component and should be unique within a view.
invalid
Sets an invalid state to the field considering the result of the field validation.
-
If
invalid=false
and validation is not passed, then the field is valid. -
If
invalid=false
and validation is passed, then the field is valid. -
If
invalid=true
and validation is not passed, then the field is invalid. -
If
invalid=true
and validation is passed, then the field is valid.
label
Specifies the label of the component.
The attribute value can either be the text itself or a key in the message bundle. In case of a key, the value should begin with the msg://
prefix.
metaClass
Defines the columns
type of dataGrid if no dataContainer attribute is defined declaratively. Defining the metaClass
attribute in XML is equivalent to setting empty items for dataGrid
, or treeDataGrid
, thus you can set the items programmatically in a view controller.
property
Sets the name of an entity attribute, which value will be displayed and edited by this visual component.
property
is always used together with the dataContainer attribute.
readOnly
Sets a boolean value specifying whether the component is put read-only mode or not. The component in read-only mode typically looks visually different to signal to the user that the value cannot be edited.
requiredIndicatorVisible
Sets the required indicator visible or not. If set visible, it is visually indicated in the user interface.
requiredMessage
Used together with the required attribute. It sets a message that will be displayed to a user when the component has no value.
The attribute can contain a message or a key from message bundle, for example: requiredMessage="msg://infoTextField.requiredMessage"
tabIndex
Sets the tabindex
attribute in the component. The tabIndex
indicates if its element can be focused, and if/where it participates in sequential keyboard navigation:
-
A negative value (usually
tabindex = -1
means that the component should be focusable, but should not be reachable via sequential keyboard navigation. -
tabindex = 0
means that the component should be focusable in sequential keyboard navigation, but its order is defined by the document’s source order. -
A positive value means the component should be focusable in sequential keyboard navigation, with its order defined by the value of the number. That is,
tabindex = 4
would be focused beforetabindex = 5
, but aftertabindex = 3
. If multiple components share the same positive tabindex value, their order relative to each other follows their position in the document source.
text
A text content of the component.
The attribute value can either be the text itself or a key in the message bundle. In case of a key, the value should begin with the msg://
prefix.
There are two ways of setting a key:
-
A short key - in this case the message will be searched in the message group of the current view. For example:
msg://infoField.caption
-
Full key including message group, for example:
msg://com.company.sample.view.user/infoField.caption
title
The value of the attribute is set to the title and aria-label HTML attributes. Most components interpret it as a tooltip.
valueChangeTimeout
Applies the value change timeout of the given mode on the registration of the DOM event listener that synchronizes. It has any effect only for LAZY
, or TIMEOUT
.
width
Sets the width of the component. The width should be in a format understood by the browser, for example, "100px"
or "2.5em"
.