integerField
integerField has many of the same features as textField, but it accepts only Integer input.
| XML Element | 
 | 
|---|---|
| Java Class | 
 | 
| Attributes | id - alignSelf - ariaLabel - ariaLabelledBy - autocapitalize - autocomplete - autocorrect - autofocus - autoselect - classNames - clearButtonVisible - colspan - css - dataContainer - enabled - errorMessage - focusShortcut - height - helperText - label - max - maxHeight - maxWidth - min - minHeight - minWidth - placeholder - property - readOnly - required - requiredMessage - step - stepButtonsVisible - tabIndex - themeNames - title - value - valueChangeMode - valueChangeTimeout - visible - width | 
| Handlers | AttachEvent - BlurEvent - ClientValidatedEvent - ComponentValueChangeEvent - CompositionEndEvent - CompositionStartEvent - CompositionUpdateEvent - DetachEvent - FocusEvent - InputEvent - KeyDownEvent - KeyPressEvent - KeyUpEvent - statusChangeHandler - validator | 
| Elements | 
Basics
The integerField component is designed to provide basic functionality for inputting and displaying integer values.
An example of integerField:
<integerField id="integerField"
              clearButtonVisible="true"
              value="27000"/> 
| integerFielddoesn’t handle formatting. Use TypedTextField when you need localized number formatting or support for different data types. | 
Data Binding
Data binding refers to linking a visual component to a data container. Changes in the visual component or corresponding data container can trigger updates to one another. See Using Data Components for more details.
The following example produces a data-aware integerField. The entity attribute must be of Integer type.
<data>
    <instance class="com.company.onboarding.entity.Step" id="stepDc"> (1)
        <fetchPlan extends="_base"/> (2)
        <loader id="stepDl"/>
    </instance>
</data>
<layout>
    <integerField dataContainer="stepDc"
                  property="duration"/> (3)
</layout>| 1 | InstanceContainerfor theStepentity. | 
| 2 | Inline fetch plan of the entity instance located in the container. | 
| 3 | Binding the component to a data container and property. The dataContainerattribute contains a link to thestepDcdata container, and thepropertyattribute refers to thedurationentity attribute. | 
Step
The step attribute is used to control the increment or decrement value when the user interacts with the field using the up/down arrows, or the step buttons. Step determines how much the value changes with each interaction. It helps you define the level of precision for the integer field.
| The stepattribute is typically used in conjunction with min and max properties to define the valid range for the number field. | 
The stepButtonsVisible attribute controls whether the buttons for increasing/decreasing the value are displayed or hidden.
<integerField step="1"
              stepButtonsVisible="true"
              min="1"
              max="10"
              helperText="Max 10 items"/> 
Validation
To check values entered into the integerField component, you can use a validator in a nested validators element.
The following predefined validators are available for integerField:
| XML Element | 
 | 
|---|---|
| Predefined validators | custom - digits - max - min - negativeOrZero - negative - notNull - positiveOrZero - positive | 
Attributes
In Jmix there are many common attributes that serve the same purpose for all components.
The following are attributes specific to integerField:
| Name | Description | Default | 
|---|---|---|
| Specifies the maximum value of the field. Entering a value which is greater than  | ||
| Specifies the minimum value of the field. Entering a value which is smaller than  | ||
| Sets the allowed number intervals of the field. This specifies how much the value will be increased/decreased when clicking on the step buttons. See Step. | 
 | |
| Sets the visibility of the buttons for increasing/decreasing the value accordingly to the default or specified step. See Step. | 
 | 
See Also
See the Vaadin Docs for more information.