G
- Actual PropertyInputGroup
typeB
- Concrete builder typepublic static interface PropertyInputGroup.Builder<G extends PropertyInputGroup,B extends PropertyInputGroup.Builder<G,B>>
PropertyInputGroup
builder.Modifier and Type | Method and Description |
---|---|
default <T,F extends com.vaadin.data.HasValue<T> & com.vaadin.ui.Component> |
bind(com.holonplatform.core.property.Property<T> property,
F field)
Bind the given
property to given HasValue component. |
default <T,V,F extends com.vaadin.data.HasValue<V> & com.vaadin.ui.Component> |
bind(com.holonplatform.core.property.Property<T> property,
F field,
com.vaadin.data.Converter<V,T> converter)
Bind the given
property to given HasValue component with different value type, using a
Converter to perform value conversions. |
default <T> B |
bind(com.holonplatform.core.property.Property<T> property,
Input.InputPropertyRenderer<T> renderer)
Convenience method to set a specific
PropertyRenderer to use to render the Input to bind to
given property using the Input.InputPropertyRenderer functional interface. |
default <T> B |
bind(com.holonplatform.core.property.Property<T> property,
Input<T> input)
Bind the given
property to given input instance. |
default <T,V> B |
bind(com.holonplatform.core.property.Property<T> property,
Input<V> input,
com.vaadin.data.Converter<V,T> converter)
Bind the given
property to given input instance with different value type, using a
Converter to perform value conversions. |
default <T,V> B |
bind(com.holonplatform.core.property.Property<T> property,
Input<V> input,
com.holonplatform.core.property.PropertyValueConverter<T,V> converter)
Bind the given
property to given input instance with different value type, using a
PropertyValueConverter to perform value conversions. |
<T> B |
bind(com.holonplatform.core.property.Property<T> property,
com.holonplatform.core.property.PropertyRenderer<Input<T>,T> renderer)
|
G |
build()
Build the
PropertyInputGroup . |
<T> B |
defaultValue(com.holonplatform.core.property.Property<T> property,
PropertyInputGroup.DefaultValueProvider<T> defaultValueProvider)
Set the default value provider for given
property . |
B |
excludeReadOnlyProperties()
Exclude read-only properties (for example
VirtualProperty s) from Input generation and
binding. |
<T> B |
hidden(com.holonplatform.core.property.Property<T> property)
Set the given property as hidden.
|
B |
ignoreMissingInputs(boolean ignoreMissingInputs)
Set whether to ignore properties without a bound
Input . |
B |
ignorePropertyValidation()
Set to ignore any
Property registered Validator when binding the property to an Input
component, i.e. to not inherit property Validator s when the property-input binding is performed. |
<P extends com.holonplatform.core.property.Property> |
properties(Iterable<P> properties)
Add given properties to the
PropertyInputGroup property set. |
<P extends com.holonplatform.core.property.Property> |
properties(P... properties)
Add given properties to the
PropertyInputGroup property set. |
B |
propertiesValidationStatusHandler(ValidationStatusHandler validationStatusHandler)
Set the
ValidationStatusHandler to use to track all the properties validation status changes. |
<T> B |
readOnly(com.holonplatform.core.property.Property<T> property)
Set the given property as read-only.
|
<T> B |
required(com.holonplatform.core.property.Property<T> property)
Set the given property as required.
|
<T> B |
required(com.holonplatform.core.property.Property<T> property,
com.holonplatform.core.i18n.Localizable message)
Set the given property as required.
|
default <T> B |
required(com.holonplatform.core.property.Property<T> property,
String message)
Set the given property as required.
|
default <T> B |
required(com.holonplatform.core.property.Property<T> property,
String message,
String messageCode,
Object... arguments)
Set the given property as required.
|
<T> B |
required(com.holonplatform.core.property.Property<T> property,
com.holonplatform.core.Validator<T> validator)
Set the given property as required, using given
Validator to check the property value. |
B |
stopOverallValidationAtFirstFailure(boolean stopOverallValidationAtFirstFailure)
Set whether to stop overall validation at first validation failure.
|
B |
stopValidationAtFirstFailure(boolean stopValidationAtFirstFailure)
Set whether to stop validation at first validation failure.
|
B |
validateOnValueChange(boolean validateOnValueChange)
|
default B |
validationStatusHandler(com.vaadin.ui.Label statusLabel)
Set the
Label to use as status label to track overall validation status changes. |
default <T> B |
validationStatusHandler(com.holonplatform.core.property.Property<T> property,
com.vaadin.ui.Label statusLabel)
Set the
Label to use to track given property validation status changes. |
<T> B |
validationStatusHandler(com.holonplatform.core.property.Property<T> property,
ValidationStatusHandler validationStatusHandler)
Set the
ValidationStatusHandler to use to track given property validation status
changes. |
B |
validationStatusHandler(ValidationStatusHandler validationStatusHandler)
Set the
ValidationStatusHandler to use to track overall validation status changes. |
<T> B |
valueChangeMode(com.holonplatform.core.property.Property<T> property,
com.vaadin.shared.ui.ValueChangeMode valueChangeMode)
|
B |
valueChangeMode(com.vaadin.shared.ui.ValueChangeMode valueChangeMode)
Set the
ValueChangeMode for all the Input components, if supported by each of them. |
<T> B |
valueChangeTimeout(com.holonplatform.core.property.Property<T> property,
int valueChangeTimeout)
Sets how often value change events are triggered by the
Input bound to given property ,
when the ValueChangeMode is set to either ValueChangeMode.LAZY or
ValueChangeMode.TIMEOUT . |
B |
withPostProcessor(PropertyBinding.PostProcessor<Input<?>> postProcessor)
Add a
PropertyBinding.PostProcessor to allow further Input configuration before the input is actually bound
to a property. |
<T> B |
withValidator(com.holonplatform.core.property.Property<T> property,
com.holonplatform.core.Validator<T> validator)
|
default <T> B |
withValidator(com.holonplatform.core.property.Property<T> property,
com.vaadin.data.Validator<T> validator)
|
B |
withValidator(com.holonplatform.core.Validator<com.holonplatform.core.property.PropertyBox> validator)
Adds a
Validator to the PropertyInputGroup , using a PropertyBox to provide the
property values to validate. |
default B |
withValidator(com.vaadin.data.Validator<com.holonplatform.core.property.PropertyBox> validator)
Adds a
Validator to the PropertyInputGroup . |
<T> B |
withValueChangeListener(com.holonplatform.core.property.Property<T> property,
PropertyInputBinder.PropertyInputValueChangeListener<T> listener)
|
<T> B |
withValueChangeListener(com.holonplatform.core.property.Property<T> property,
ValueHolder.ValueChangeListener<T> listener)
|
B |
withValueChangeListener(ValueHolder.ValueChangeListener<com.holonplatform.core.property.PropertyBox> listener)
Add a
ValueChangeListener to be notified when the input group value changes. |
<P extends com.holonplatform.core.property.Property> B properties(P... properties)
PropertyInputGroup
property set.P
- Property typeproperties
- Properties to add<P extends com.holonplatform.core.property.Property> B properties(Iterable<P> properties)
PropertyInputGroup
property set.P
- Property typeproperties
- Properties to add (not null)<T> B readOnly(com.holonplatform.core.property.Property<T> property)
Input
bound to the property will
be setted as read-only too, and its value will never be written to a PropertyBox
nor validated.T
- Property typeproperty
- Property to set as read-only (not null)<T> B required(com.holonplatform.core.property.Property<T> property)
Input
bound to the property will
be setted as required, and its validation will fail when empty.T
- Property typeproperty
- Property to set as required (not null)<T> B required(com.holonplatform.core.property.Property<T> property, com.holonplatform.core.Validator<T> validator)
Validator
to check the property value. If a property
is required, the Input
bound to the property will be setted as required, and its validation will fail
when empty.T
- Property typeproperty
- Property to set as required (not null)validator
- The Validator
to use to check the required property value (not null)<T> B required(com.holonplatform.core.property.Property<T> property, com.holonplatform.core.i18n.Localizable message)
Input
bound to the property will
be setted as required, and its validation will fail when empty.T
- Property typeproperty
- Property to set as required (not null)message
- The message to use to notify the required validation failuredefault <T> B required(com.holonplatform.core.property.Property<T> property, String message, String messageCode, Object... arguments)
Input
bound to the property will
be setted as required, and its validation will fail when empty.T
- Property typeproperty
- Property to set as required (not null)message
- The default message to use to notify the required validation failuremessageCode
- The message localization codearguments
- Optional message translation argumentsdefault <T> B required(com.holonplatform.core.property.Property<T> property, String message)
Input
bound to the property will
be setted as required, and its validation will fail when empty.T
- Property typeproperty
- Property to set as required (not null)message
- The default message to use to notify the required validation failure<T> B hidden(com.holonplatform.core.property.Property<T> property)
Input
bound to the property will never
be generated, but its value will be written to a PropertyBox
using
PropertyInputGroup.getValue()
.T
- Property typeproperty
- Property to set as hidden (not null)<T> B defaultValue(com.holonplatform.core.property.Property<T> property, PropertyInputGroup.DefaultValueProvider<T> defaultValueProvider)
property
.T
- Property typeproperty
- Property (not null)defaultValueProvider
- DefaultValueProvider (not null)B excludeReadOnlyProperties()
VirtualProperty
s) from Input
generation and
binding.<T> B withValidator(com.holonplatform.core.property.Property<T> property, com.holonplatform.core.Validator<T> validator)
T
- Property typeproperty
- Property (not null)validator
- Validator to add (not null)default <T> B withValidator(com.holonplatform.core.property.Property<T> property, com.vaadin.data.Validator<T> validator)
T
- Property typeproperty
- Property (not null)validator
- Validator to add (not null)B withValidator(com.holonplatform.core.Validator<com.holonplatform.core.property.PropertyBox> validator)
Validator
to the PropertyInputGroup
, using a PropertyBox
to provide the
property values to validate.validator
- Validator to add (not null)default B withValidator(com.vaadin.data.Validator<com.holonplatform.core.property.PropertyBox> validator)
Validator
to the PropertyInputGroup
.validator
- Validator to add (not null)<T> B validationStatusHandler(com.holonplatform.core.property.Property<T> property, ValidationStatusHandler validationStatusHandler)
ValidationStatusHandler
to use to track given property
validation status
changes.T
- Property typeproperty
- Property for which to set the validation status handlervalidationStatusHandler
- the ValidationStatusHandler
to associate to given
property
(not null)default <T> B validationStatusHandler(com.holonplatform.core.property.Property<T> property, com.vaadin.ui.Label statusLabel)
Label
to use to track given property
validation status changes.T
- Property typeproperty
- Property for which to set the validation status labelstatusLabel
- the status Label
to use to track given property
validation status
(not null)B propertiesValidationStatusHandler(ValidationStatusHandler validationStatusHandler)
ValidationStatusHandler
to use to track all the properties validation status changes.
A specific ValidationStatusHandler
for each property can be configured using
validationStatusHandler(Property, ValidationStatusHandler)
.
validationStatusHandler
- the ValidationStatusHandler
to setB validationStatusHandler(ValidationStatusHandler validationStatusHandler)
ValidationStatusHandler
to use to track overall validation status changes.validationStatusHandler
- the ValidationStatusHandler
to set (not null)default B validationStatusHandler(com.vaadin.ui.Label statusLabel)
Label
to use as status label to track overall validation status changes.statusLabel
- the status Label
to set (not null)B validateOnValueChange(boolean validateOnValueChange)
Input
s value every time the Input
value changes.
Default is true
.
validateOnValueChange
- true
to perform value validation every time a Input
value
changes, false
if notB stopValidationAtFirstFailure(boolean stopValidationAtFirstFailure)
true
, only the first
Validator.ValidationException
is thrown at validation, otherwise a Validator.ValidationException
containing all
the occurred validation exception is thrown.stopValidationAtFirstFailure
- true
to stop validation at first validation failureB stopOverallValidationAtFirstFailure(boolean stopOverallValidationAtFirstFailure)
true
, only the first
PropertyInputGroup.OverallValidationException
is thrown at validation, otherwise a PropertyInputGroup.OverallValidationException
containing all the occurred validation exception is thrown.
The overall validation is the one which is performed using validators added with
withValidator(Validator)
method.
stopOverallValidationAtFirstFailure
- true
to stop overall validation at first validation
failureB ignorePropertyValidation()
Property
registered Validator
when binding the property to an Input
component, i.e. to not inherit property Validator
s when the property-input binding is performed.<T> B bind(com.holonplatform.core.property.Property<T> property, com.holonplatform.core.property.PropertyRenderer<Input<T>,T> renderer)
T
- Property typeproperty
- Property (not null)renderer
- Property renderer (not null)default <T> B bind(com.holonplatform.core.property.Property<T> property, Input.InputPropertyRenderer<T> renderer)
PropertyRenderer
to use to render the Input
to bind to
given property
using the Input.InputPropertyRenderer
functional interface.T
- Property typeproperty
- Property (not null)renderer
- Property renderer (not null)default <T> B bind(com.holonplatform.core.property.Property<T> property, Input<T> input)
property
to given input
instance. If the property was already bound
to a Input
, the old input will be replaced by the new input.
This method also adds property validators to given Input
when applicable.
T
- Property typeproperty
- Property (not null)input
- Input to bind (not null)default <T,F extends com.vaadin.data.HasValue<T> & com.vaadin.ui.Component> B bind(com.holonplatform.core.property.Property<T> property, F field)
property
to given HasValue
component. If the property was already bound
to a Input
, the old input will be replaced by the new input.T
- Property typeF
- HasValue typeproperty
- Property (not null)field
- HasValue component to bind (not null)default <T,V> B bind(com.holonplatform.core.property.Property<T> property, Input<V> input, com.vaadin.data.Converter<V,T> converter)
property
to given input
instance with different value type, using a
Converter
to perform value conversions. If the property was already bound to a Input
, the old
input will be replaced by the new input.
This method also adds property validators to given Input
when applicable.
T
- Property typeV
- Input value type typeproperty
- Property (not null)input
- Input to bind (not null)converter
- Value converter (not null)default <T,V> B bind(com.holonplatform.core.property.Property<T> property, Input<V> input, com.holonplatform.core.property.PropertyValueConverter<T,V> converter)
property
to given input
instance with different value type, using a
PropertyValueConverter
to perform value conversions. If the property was already bound to a
Input
, the old input will be replaced by the new input.
This method also adds property validators to given Input
when applicable.
T
- Property typeV
- Input value type typeproperty
- Property (not null)input
- Input to bind (not null)converter
- Value converter (not null)default <T,V,F extends com.vaadin.data.HasValue<V> & com.vaadin.ui.Component> B bind(com.holonplatform.core.property.Property<T> property, F field, com.vaadin.data.Converter<V,T> converter)
property
to given HasValue
component with different value type, using a
Converter
to perform value conversions. If the property was already bound to an Input
, the
old input will be replaced by the new input.
This method also adds property validators to given Input
when applicable.
T
- Property typeV
- Input value typeF
- HasValue typeproperty
- Property (not null)field
- The field to bind (not null)converter
- Value converter (not null)B ignoreMissingInputs(boolean ignoreMissingInputs)
Input
. Default is false
, and an
exception is thrown if a property of the PropertyInputGroup
cannot be bound to any input component.ignoreMissingInputs
- Whether to ignore when the Input
for a property is missingB withPostProcessor(PropertyBinding.PostProcessor<Input<?>> postProcessor)
PropertyBinding.PostProcessor
to allow further Input
configuration before the input is actually bound
to a property.postProcessor
- the PropertyBinding.PostProcessor
to add (not null)B withValueChangeListener(ValueHolder.ValueChangeListener<com.holonplatform.core.property.PropertyBox> listener)
ValueChangeListener
to be notified when the input group value changes.listener
- The ValueChangeListener to add (not null)B valueChangeMode(com.vaadin.shared.ui.ValueChangeMode valueChangeMode)
ValueChangeMode
for all the Input
components, if supported by each of them.valueChangeMode
- The overall ValueChangeMode
to set (not null)<T> B withValueChangeListener(com.holonplatform.core.property.Property<T> property, ValueHolder.ValueChangeListener<T> listener)
T
- Property typeproperty
- Property (not null)listener
- The ValueChangeListener to add (not null)<T> B withValueChangeListener(com.holonplatform.core.property.Property<T> property, PropertyInputBinder.PropertyInputValueChangeListener<T> listener)
PropertyInputValueChangeListener
to the Input
bound to given property
.
Differently from the standard ValueChangeListener
, the PropertyInputValueChangeListener
provides also a reference to the PropertyInputBinder
to which the value change source belongs, i.e.
the PropertyInputGroup/Form.
T
- Property typeproperty
- Property (not null)listener
- The PropertyInputValueChangeListener
to add (not null)<T> B valueChangeMode(com.holonplatform.core.property.Property<T> property, com.vaadin.shared.ui.ValueChangeMode valueChangeMode)
ValueChangeMode
for the Input
bound to given property
, to control how
the Input
triggers value change events.
The ValueChangeMode
may not be supported by the Input
, in this case this setting will be
ignored.
T
- Property typeproperty
- Property (not null)valueChangeMode
- The ValueChangeMode
to set (not null)<T> B valueChangeTimeout(com.holonplatform.core.property.Property<T> property, int valueChangeTimeout)
Input
bound to given property
,
when the ValueChangeMode
is set to either ValueChangeMode.LAZY
or
ValueChangeMode.TIMEOUT
.T
- Property typeproperty
- Property (not null)valueChangeTimeout
- Timeout in milliseconds (greater or equal to 0)valueChangeMode(Property, ValueChangeMode)
G build()
PropertyInputGroup
.PropertyInputGroup
instanceCopyright © 2018 The Holon Platform. All rights reserved.