com.holonplatform.vaadin.components

## Interface PropertyInputGroup.Builder<G extends PropertyInputGroup,B extends PropertyInputGroup.Builder<G,B>>

- Type Parameters:
    `G` - Actual `PropertyInputGroup` type
    `B` - Concrete builder type
  All Known Subinterfaces:
    PropertyInputForm.PropertyInputFormBuilder<C>, PropertyInputGroup.PropertyInputGroupBuilder
  Enclosing interface:
    PropertyInputGroup

      public static interface PropertyInputGroup.Builder<G extends PropertyInputGroup,B extends PropertyInputGroup.Builder<G,B>>

  Base `PropertyInputGroup` builder.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default <T,F extends com.vaadin.data.HasValue<T> & com.vaadin.ui.Component> B` | `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> B` | `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)` Set the specific `PropertyRenderer` to use to render the `Input` to bind to given `property`.
    `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> B` | `properties(Iterable<P> properties)` Add given properties to the `PropertyInputGroup` property set.
    `<P extends com.holonplatform.core.property.Property> B` | `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)` Sets whether to validate the available `Input`s value every time the `Input` value changes.
    `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)` Set the `ValueChangeMode` for the `Input` bound to given `property`, to control how the `Input` triggers value change events.
    `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)` Adds a `Validator` to the `Input` bound to given `property`.
    `default <T> B` | `withValidator(com.holonplatform.core.property.Property<T> property, com.vaadin.data.Validator<T> validator)` Adds a `Validator` to the `Input` bound to given `property`.
    `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)` Add a `PropertyInputValueChangeListener` to the `Input` bound to given `property`.
    `<T> B` | `withValueChangeListener(com.holonplatform.core.property.Property<T> property, ValueHolder.ValueChangeListener<T> listener)` Add a `ValueChangeListener` to the `Input` bound to given `property`.
    `B` | `withValueChangeListener(ValueHolder.ValueChangeListener<com.holonplatform.core.property.PropertyBox> listener)` Add a `ValueChangeListener` to be notified when the input group value changes.

- - ### Method Detail

    - #### properties

          <P extends com.holonplatform.core.property.Property> B properties(P... properties)

      Add given properties to the `PropertyInputGroup` property set.
      Type Parameters:
        `P` - Property type
      Parameters:
        `properties` - Properties to add
      Returns:
        this

    - #### properties

          <P extends com.holonplatform.core.property.Property> B properties(Iterable<P> properties)

      Add given properties to the `PropertyInputGroup` property set.
      Type Parameters:
        `P` - Property type
      Parameters:
        `properties` - Properties to add (not null)
      Returns:
        this

    - #### readOnly

          <T> B readOnly(com.holonplatform.core.property.Property<T> property)

      Set the given property as read-only. If a property is read-only, the `Input` bound to the property will be setted as read-only too, and its value will never be written to a `PropertyBox` nor validated.
      Type Parameters:
        `T` - Property type
      Parameters:
        `property` - Property to set as read-only (not null)
      Returns:
        this

    - #### required

          <T> B required(com.holonplatform.core.property.Property<T> property)

      Set the given property as required. If a property is required, the `Input` bound to the property will be setted as required, and its validation will fail when empty.
      Type Parameters:
        `T` - Property type
      Parameters:
        `property` - Property to set as required (not null)
      Returns:
        this

    - #### 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. If a property is required, the `Input` bound to the property will be setted as required, and its validation will fail when empty.
      Type Parameters:
        `T` - Property type
      Parameters:
        `property` - Property to set as required (not null)
        `validator` - The `Validator` to use to check the required property value (not null)
      Returns:
        this

    - #### required

          <T> B required(com.holonplatform.core.property.Property<T> property,
                         com.holonplatform.core.i18n.Localizable message)

      Set the given property as required. If a property is required, the `Input` bound to the property will be setted as required, and its validation will fail when empty.
      Type Parameters:
        `T` - Property type
      Parameters:
        `property` - Property to set as required (not null)
        `message` - The message to use to notify the required validation failure
      Returns:
        this

    - #### required

          default <T> B required(com.holonplatform.core.property.Property<T> property,
                                 String message,
                                 String messageCode,
                                 Object... arguments)

      Set the given property as required. If a property is required, the `Input` bound to the property will be setted as required, and its validation will fail when empty.
      Type Parameters:
        `T` - Property type
      Parameters:
        `property` - Property to set as required (not null)
        `message` - The default message to use to notify the required validation failure
        `messageCode` - The message localization code
        `arguments` - Optional message translation arguments
      Returns:
        this

    - #### required

          default <T> B required(com.holonplatform.core.property.Property<T> property,
                                 String message)

      Set the given property as required. If a property is required, the `Input` bound to the property will be setted as required, and its validation will fail when empty.
      Type Parameters:
        `T` - Property type
      Parameters:
        `property` - Property to set as required (not null)
        `message` - The default message to use to notify the required validation failure
      Returns:
        this

    - #### hidden

          <T> B hidden(com.holonplatform.core.property.Property<T> property)

      Set the given property as hidden. If a property is hidden, the `Input` bound to the property will never be generated, but its value will be written to a `PropertyBox` using `PropertyInputGroup.getValue()`.
      Type Parameters:
        `T` - Property type
      Parameters:
        `property` - Property to set as hidden (not null)
      Returns:
        this

    - #### defaultValue

          <T> B defaultValue(com.holonplatform.core.property.Property<T> property,
                             PropertyInputGroup.DefaultValueProvider<T> defaultValueProvider)

      Set the default value provider for given `property`.
      Type Parameters:
        `T` - Property type
      Parameters:
        `property` - Property (not null)
        `defaultValueProvider` - DefaultValueProvider (not null)
      Returns:
        this

    - #### excludeReadOnlyProperties

          B excludeReadOnlyProperties()

      Exclude read-only properties (for example `VirtualProperty`s) from `Input` generation and binding.
      Returns:
        this

    - #### withValidator

          <T> B withValidator(com.holonplatform.core.property.Property<T> property,
                              com.holonplatform.core.Validator<T> validator)

      Adds a `Validator` to the `Input` bound to given `property`.
      Type Parameters:
        `T` - Property type
      Parameters:
        `property` - Property (not null)
        `validator` - Validator to add (not null)
      Returns:
        this

    - #### withValidator

          default <T> B withValidator(com.holonplatform.core.property.Property<T> property,
                                      com.vaadin.data.Validator<T> validator)

      Adds a `Validator` to the `Input` bound to given `property`.
      Type Parameters:
        `T` - Property type
      Parameters:
        `property` - Property (not null)
        `validator` - Validator to add (not null)
      Returns:
        this

    - #### withValidator

          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.
      Parameters:
        `validator` - Validator to add (not null)
      Returns:
        this

    - #### withValidator

          default B withValidator(com.vaadin.data.Validator<com.holonplatform.core.property.PropertyBox> validator)

      Adds a `Validator` to the `PropertyInputGroup`.
      Parameters:
        `validator` - Validator to add (not null)
      Returns:
        this

    - #### validationStatusHandler

          <T> B validationStatusHandler(com.holonplatform.core.property.Property<T> property,
                                        ValidationStatusHandler validationStatusHandler)

      Set the `ValidationStatusHandler` to use to track given `property` validation status changes.
      Type Parameters:
        `T` - Property type
      Parameters:
        `property` - Property for which to set the validation status handler
        `validationStatusHandler` - the `ValidationStatusHandler` to associate to given `property` (not null)
      Returns:
        this

    - #### validationStatusHandler

          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.
      Type Parameters:
        `T` - Property type
      Parameters:
        `property` - Property for which to set the validation status label
        `statusLabel` - the status `Label` to use to track given `property` validation status (not null)
      Returns:
        this

    - #### propertiesValidationStatusHandler

          B propertiesValidationStatusHandler(ValidationStatusHandler validationStatusHandler)

      Set the `ValidationStatusHandler` to use to track all the properties validation status changes.

      A specific `ValidationStatusHandler` for each property can be configured using `validationStatusHandler(Property, ValidationStatusHandler)`.

      Parameters:
        `validationStatusHandler` - the `ValidationStatusHandler` to set
      Returns:
        this

    - #### validationStatusHandler

          B validationStatusHandler(ValidationStatusHandler validationStatusHandler)

      Set the `ValidationStatusHandler` to use to track overall validation status changes.
      Parameters:
        `validationStatusHandler` - the `ValidationStatusHandler` to set (not null)
      Returns:
        this

    - #### validationStatusHandler

          default B validationStatusHandler(com.vaadin.ui.Label statusLabel)

      Set the `Label` to use as status label to track overall validation status changes.
      Parameters:
        `statusLabel` - the status `Label` to set (not null)
      Returns:
        this

    - #### validateOnValueChange

          B validateOnValueChange(boolean validateOnValueChange)

      Sets whether to validate the available `Input`s value every time the `Input` value changes.

      Default is `true`.

      Parameters:
        `validateOnValueChange` - `true` to perform value validation every time a `Input` value changes, `false` if not
      Returns:
        this

    - #### stopValidationAtFirstFailure

          B stopValidationAtFirstFailure(boolean stopValidationAtFirstFailure)

      Set whether to stop validation at first validation failure. If `true`, only the first `Validator.ValidationException` is thrown at validation, otherwise a `Validator.ValidationException` containing all the occurred validation exception is thrown.
      Parameters:
        `stopValidationAtFirstFailure` - `true` to stop validation at first validation failure
      Returns:
        this

    - #### stopOverallValidationAtFirstFailure

          B stopOverallValidationAtFirstFailure(boolean stopOverallValidationAtFirstFailure)

      Set whether to stop overall validation at first validation failure. If `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.

      Parameters:
        `stopOverallValidationAtFirstFailure` - `true` to stop overall validation at first validation failure
      Returns:
        this

    - #### ignorePropertyValidation

          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.
      Returns:
        this

    - #### bind

          <T> B bind(com.holonplatform.core.property.Property<T> property,
                     com.holonplatform.core.property.PropertyRenderer<Input<T>,T> renderer)

      Set the specific `PropertyRenderer` to use to render the `Input` to bind to given `property`.
      Type Parameters:
        `T` - Property type
      Parameters:
        `property` - Property (not null)
        `renderer` - Property renderer (not null)
      Returns:
        this

    - #### bind

          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.
      Type Parameters:
        `T` - Property type
      Parameters:
        `property` - Property (not null)
        `renderer` - Property renderer (not null)
      Returns:
        this

    - #### bind

          default <T> B bind(com.holonplatform.core.property.Property<T> property,
                             Input<T> input)

      Bind the given `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.

      Type Parameters:
        `T` - Property type
      Parameters:
        `property` - Property (not null)
        `input` - Input to bind (not null)
      Returns:
        this

    - #### bind

          default <T,F extends com.vaadin.data.HasValue<T> & com.vaadin.ui.Component> B bind(com.holonplatform.core.property.Property<T> property,
                                                                                             F field)

      Bind the given `property` to given `HasValue` component. If the property was already bound to a `Input`, the old input will be replaced by the new input.
      Type Parameters:
        `T` - Property type
        `F` - HasValue type
      Parameters:
        `property` - Property (not null)
        `field` - HasValue component to bind (not null)
      Returns:
        this

    - #### bind

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

      Type Parameters:
        `T` - Property type
        `V` - Input value type type
      Parameters:
        `property` - Property (not null)
        `input` - Input to bind (not null)
        `converter` - Value converter (not null)
      Returns:
        this

    - #### bind

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

      Type Parameters:
        `T` - Property type
        `V` - Input value type type
      Parameters:
        `property` - Property (not null)
        `input` - Input to bind (not null)
        `converter` - Value converter (not null)
      Returns:
        this

    - #### bind

          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)

      Bind the given `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.

      Type Parameters:
        `T` - Property type
        `V` - Input value type
        `F` - HasValue type
      Parameters:
        `property` - Property (not null)
        `field` - The field to bind (not null)
        `converter` - Value converter (not null)
      Returns:
        this

    - #### ignoreMissingInputs

          B ignoreMissingInputs(boolean ignoreMissingInputs)

      Set whether to ignore properties without a bound `Input`. Default is `false`, and an exception is thrown if a property of the `PropertyInputGroup` cannot be bound to any input component.
      Parameters:
        `ignoreMissingInputs` - Whether to ignore when the `Input` for a property is missing
      Returns:
        this

    - #### withPostProcessor

          B withPostProcessor(PropertyBinding.PostProcessor<Input<?>> postProcessor)

      Add a `PropertyBinding.PostProcessor` to allow further `Input` configuration before the input is actually bound to a property.
      Parameters:
        `postProcessor` - the `PropertyBinding.PostProcessor` to add (not null)
      Returns:
        this

    - #### withValueChangeListener

          B withValueChangeListener(ValueHolder.ValueChangeListener<com.holonplatform.core.property.PropertyBox> listener)

      Add a `ValueChangeListener` to be notified when the input group value changes.
      Parameters:
        `listener` - The ValueChangeListener to add (not null)
      Returns:
        this

    - #### valueChangeMode

          B valueChangeMode(com.vaadin.shared.ui.ValueChangeMode valueChangeMode)

      Set the `ValueChangeMode` for all the `Input` components, if supported by each of them.
      Parameters:
        `valueChangeMode` - The overall `ValueChangeMode` to set (not null)
      Returns:
        this

    - #### withValueChangeListener

          <T> B withValueChangeListener(com.holonplatform.core.property.Property<T> property,
                                        ValueHolder.ValueChangeListener<T> listener)

      Add a `ValueChangeListener` to the `Input` bound to given `property`.
      Type Parameters:
        `T` - Property type
      Parameters:
        `property` - Property (not null)
        `listener` - The ValueChangeListener to add (not null)
      Returns:
        this

    - #### withValueChangeListener

          <T> B withValueChangeListener(com.holonplatform.core.property.Property<T> property,
                                        PropertyInputBinder.PropertyInputValueChangeListener<T> listener)

      Add a `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.

      Type Parameters:
        `T` - Property type
      Parameters:
        `property` - Property (not null)
        `listener` - The `PropertyInputValueChangeListener` to add (not null)
      Returns:
        this

    - #### valueChangeMode

          <T> B valueChangeMode(com.holonplatform.core.property.Property<T> property,
                                com.vaadin.shared.ui.ValueChangeMode valueChangeMode)

      Set the `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.

      Type Parameters:
        `T` - Property type
      Parameters:
        `property` - Property (not null)
        `valueChangeMode` - The `ValueChangeMode` to set (not null)
      Returns:
        this

    - #### valueChangeTimeout

          <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`.
      Type Parameters:
        `T` - Property type
      Parameters:
        `property` - Property (not null)
        `valueChangeTimeout` - Timeout in milliseconds (greater or equal to 0)
      Returns:
        this
      See Also:
        `valueChangeMode(Property, ValueChangeMode)`

    - #### build

          G build()

      Build the `PropertyInputGroup`.
      Returns:
        a new `PropertyInputGroup` instance

Copyright © 2019 The Holon Platform. All rights reserved.