com.vaadin.flow.component.textfield.
Class IntegerField.IntegerFieldI18n
All Implemented Interfaces:
Enclosing class:
The internationalization properties for IntegerField
.
See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the error message displayed when the field contains user input that the server is unable to convert to type
Integer
.Gets the error message displayed when the field value is greater than the maximum allowed value.
Gets the error message displayed when the field value is smaller than the minimum allowed value.
Gets the error message displayed when the field is required but empty.
Gets the error message displayed when the field value is not a multiple of the step value.
setBadInputErrorMessage
(String errorMessage) Sets the error message to display when the field contains user input that the server is unable to convert to type
Integer
.setMaxErrorMessage
(String errorMessage) Sets the error message to display when the field value is greater than the maximum allowed value.
setMinErrorMessage
(String errorMessage) Sets the error message to display when the field value is smaller than the minimum allowed value.
setRequiredErrorMessage
(String errorMessage) Sets the error message to display when the field is required but empty.
setStepErrorMessage
(String errorMessage) Sets the error message to display when the field value is not a multiple of the step value.
-
Constructor Details
-
IntegerFieldI18n
public IntegerFieldI18n()
-
-
Method Details
-
getBadInputErrorMessage
Gets the error message displayed when the field contains user input that the server is unable to convert to type
Integer
.Specified by:
getBadInputErrorMessage
in interfaceAbstractNumberFieldI18n
Returns:
the error message or
null
if not set -
setBadInputErrorMessage
Sets the error message to display when the field contains user input that the server is unable to convert to type
Integer
.Note, custom error messages set with
IntegerField.setErrorMessage(String)
take priority over i18n error messages.Parameters:
errorMessage
- the error message to set, ornull
to clearReturns:
this instance for method chaining
-
getRequiredErrorMessage
Gets the error message displayed when the field is required but empty.
Specified by:
getRequiredErrorMessage
in interfaceAbstractNumberFieldI18n
Returns:
the error message or
null
if not setSee Also:
-
setRequiredErrorMessage
Sets the error message to display when the field is required but empty.
Note, custom error messages set with
IntegerField.setErrorMessage(String)
take priority over i18n error messages.Parameters:
errorMessage
- the error message to set, ornull
to clearReturns:
this instance for method chaining
See Also:
-
getMinErrorMessage
Gets the error message displayed when the field value is smaller than the minimum allowed value.
Specified by:
getMinErrorMessage
in interfaceAbstractNumberFieldI18n
Returns:
the error message or
null
if not setSee Also:
-
setMinErrorMessage
Sets the error message to display when the field value is smaller than the minimum allowed value.
Note, custom error messages set with
IntegerField.setErrorMessage(String)
take priority over i18n error messages.Parameters:
errorMessage
- the error message to set, ornull
to clearReturns:
this instance for method chaining
See Also:
-
getMaxErrorMessage
Gets the error message displayed when the field value is greater than the maximum allowed value.
Specified by:
getMaxErrorMessage
in interfaceAbstractNumberFieldI18n
Returns:
the error message or
null
if not setSee Also:
-
setMaxErrorMessage
Sets the error message to display when the field value is greater than the maximum allowed value.
Note, custom error messages set with
IntegerField.setErrorMessage(String)
take priority over i18n error messages.Parameters:
errorMessage
- the error message to set, ornull
to clearReturns:
this instance for method chaining
See Also:
-
getStepErrorMessage
Gets the error message displayed when the field value is not a multiple of the step value.
Specified by:
getStepErrorMessage
in interfaceAbstractNumberFieldI18n
Returns:
the error message or
null
if not setSee Also:
-
setStepErrorMessage
Sets the error message to display when the field value is not a multiple of the step value.
Note, custom error messages set with
IntegerField.setErrorMessage(String)
take priority over i18n error messages.Parameters:
errorMessage
- the error message to set, ornull
to clearReturns:
this instance for method chaining
See Also:
-