bigDecimalField

bigDecimalField has many of the same features as textField, but it accepts only BigDecimal input.

XML Element

bigDecimalField

Java Class

JmixBigDecimalField

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:

  1. Specify the name of the data container as the dataContainer attribute value.

  2. 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

small

Makes the component smaller.

Aura, Lumo

align-left

Aligns the field value to the left side.

Aura, Lumo

align-center

Centers the field value.

Aura, Lumo

align-right

Aligns the field value to the right side.

Aura, Lumo

helper-above-field

Renders the helper text above the field, below the label.

Aura, Lumo

Attributes

The following attributes are specific to bigDecimalField:

Name Description Default

autoselect

Controls whether text is selected automatically when the field receives focus.

clearButtonVisible

Controls whether the field displays a clear button.

false

value

Sets the component value.

The following shared attributes are supported by bigDecimalField:

Handlers

The following handlers are specific to bigDecimalField:

Name Description

validator

Validates the component value.

The following shared handlers are supported by bigDecimalField:

Elements

A bigDecimalField can include prefix, suffix, tooltip, and validator as its nested elements.