bigDecimalField
bigDecimalField has many of the same features as textField, but it accepts only BigDecimal input.
XML Element |
|
|---|---|
Java Class |
|
Basics
An example of bigDecimalField:
<bigDecimalField id="bigDecimalField" label="BigDecimalField" width="15em"/>
Data-aware bigDecimalField
You can bind a component to an attribute of an entity held in a data container.
To bind bigDecimalField to an entity attribute:
-
Specify the name of the data container as the dataContainer attribute value.
-
Specify the name of the entity attribute as the property attribute value.
The entity attribute must be of BigDecimal type.
<data>
<instance id="productDc"
class="io.jmix.uisamples.entity.Product"
fetchPlan="_local"/>
</data>
<layout>
<bigDecimalField id="bigDecimalField" label="Field connected to a container" width="15em"
dataContainer="productDc" property="price"/>
<hbox>
<span text="Value in the container:"/>
<span id="spanValue"/>
</hbox>
</layout>
Theme Variants
Use the themeNames attribute to apply one or more theme variants.
| Variant | Description | Supported By |
|---|---|---|
|
Makes the component smaller. |
Aura, Lumo |
|
Aligns the field value to the left side. |
Aura, Lumo |
|
Centers the field value. |
Aura, Lumo |
|
Aligns the field value to the right side. |
Aura, Lumo |
|
Renders the helper text above the field, below the label. |
Aura, Lumo |
Attributes
The following attributes are specific to bigDecimalField:
| Name | Description | Default |
|---|---|---|
Controls whether text is selected automatically when the field receives focus. |
— |
|
Controls whether the field displays a clear button. |
|
|
Sets the component value. |
— |
The following shared attributes are supported by bigDecimalField:
id - alignSelf - ariaLabel - ariaLabelledBy - autocapitalize - autocomplete - autocorrect - autofocus - classNames - colspan - css - dataContainer - enabled - errorMessage - focusShortcut - height - helperText - label - maxHeight - maxWidth - minHeight - minWidth - placeholder - property - readOnly - required - requiredMessage - tabIndex - themeNames - title - valueChangeMode - valueChangeTimeout - visible - width
Handlers
The following handlers are specific to bigDecimalField:
| Name | Description |
|---|---|
Validates the component value. |
The following shared handlers are supported by bigDecimalField: