BEAN - the bean typepublic class BeanValidationBinder<BEAN> extends Binder<BEAN>
Binder,
BeanValidator,
HasValue,
Serialized FormBinder.Binding<BEAN,TARGET>, Binder.BindingBuilder<BEAN,TARGET>, Binder.BindingBuilderImpl<BEAN,FIELDVALUE,TARGET>, Binder.BindingImpl<BEAN,FIELDVALUE,TARGET>| Constructor and Description |
|---|
BeanValidationBinder(Class<BEAN> beanType)
Creates a new binder that uses reflection based on the provided bean type
to resolve bean properties.
|
BeanValidationBinder(Class<BEAN> beanType,
boolean scanNestedDefinitions)
Creates a new binder that uses reflection based on the provided bean type
to resolve bean properties.
|
| Modifier and Type | Method and Description |
|---|---|
protected Binder.BindingBuilder<BEAN,?> |
configureBinding(Binder.BindingBuilder<BEAN,?> binding,
PropertyDefinition<BEAN,?> definition)
Configures the
binding with the property definition
definition before it's being bound. |
RequiredFieldConfigurator |
getRequiredConfigurator()
Gets field required indicator configuration logic.
|
void |
setRequiredConfigurator(RequiredFieldConfigurator configurator)
Sets a logic which allows to configure require indicator via
HasValue.setRequiredIndicatorVisible(boolean) based on property
descriptor. |
addListener, addStatusChangeListener, addValueChangeListener, bind, bind, bindInstanceFields, clearError, createBinding, doCreateBinding, forField, forMemberField, getBean, getBeanState, getBinding, getBindings, getConverterFactory, getFields, getStatusLabel, getValidationErrorHandler, getValidationStatusHandler, handleBinderValidationStatus, handleError, handleFieldValueChange, handleValidationStatus, hasChanges, isFieldsValidationStatusChangeListenerEnabled, isValid, isValidatorsDisabled, readBean, removeBean, removeBinding, removeBinding, removeBinding, removeBindingInternal, restoreBeanState, setBean, setFieldsValidationStatusChangeListenerEnabled, setReadOnly, setStatusLabel, setValidationErrorHandler, setValidationStatusHandler, setValidatorsDisabled, validate, validate, withPropertySet, withValidator, withValidator, withValidator, writeBean, writeBeanAsDraft, writeBeanAsDraft, writeBeanIfValidpublic BeanValidationBinder(Class<BEAN> beanType)
Binder class should be used instead
(this constructor will throw an exception). Otherwise
BeanValidator is added to each binding that is defined using a
property name.beanType - the bean type to use, not nullpublic BeanValidationBinder(Class<BEAN> beanType, boolean scanNestedDefinitions)
Binder class should be used instead
(this constructor will throw an exception). Otherwise
BeanValidator is added to each binding that is defined using a
property name.beanType - the bean type to use, not nullscanNestedDefinitions - if true, scan for nested property definitions as wellpublic void setRequiredConfigurator(RequiredFieldConfigurator configurator)
HasValue.setRequiredIndicatorVisible(boolean) based on property
descriptor.
Required indicator configuration will not be used at all if
configurator is null.
By default the RequiredFieldConfigurator.DEFAULT configurator is
used.
configurator - required indicator configurator, may be nullpublic RequiredFieldConfigurator getRequiredConfigurator()
nullsetRequiredConfigurator(RequiredFieldConfigurator)protected Binder.BindingBuilder<BEAN,?> configureBinding(Binder.BindingBuilder<BEAN,?> binding, PropertyDefinition<BEAN,?> definition)
Binderbinding with the property definition
definition before it's being bound.configureBinding in class Binder<BEAN>binding - a binding to configuredefinition - a property definition informationCopyright © 2025. All rights reserved.