com.holonplatform.vaadin.components

## Interface PropertyInputBinder

- All Superinterfaces:
    PropertySetBound
  All Known Subinterfaces:
    PropertyInputForm, PropertyInputGroup

      public interface PropertyInputBinder
      extends PropertySetBound

  Represents a component which binds a property set to `Input` components.

  Provides methods to obtain the property set and the property-input bindings, for example to get the `Input` bound to a specific property.

  Since:
    5.0.5

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `PropertyInputBinder.PropertyInputValueChangeListener<V>` A listener for `Input` value change events when the `Input` is bound to a `Property` within a `PropertyInputBinder` component.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> Optional<Input<T>>` | `getInput(com.holonplatform.core.property.Property<T> property)` Get the `Input` bound to given `property`, if any.
    `Iterable<Input<?>>` | `getInputs()` Gets all the `Input`s that have been bound to a property.
    `default void` | `refresh()` Refresh the value of all available `Input`s, using current values.
    `void` | `refresh(boolean readOnly)` Refresh the value of all available `Input`s, using current values.
    `<T> void` | `refresh(com.holonplatform.core.property.Property<T> property)` Refresh the value of the `Input` bound to given `property`, if available, using currently available values.
    `default <T> Input<T>` | `requireInput(com.holonplatform.core.property.Property<T> property)` Get the `Input` bound to given `property`, if any.
    `<T> Stream<PropertyBinding<T,Input<T>>>` | `stream()` Return a `Stream` of the properties and their bound `Input`s of this input group.

    - ### Methods inherited from interface com.holonplatform.vaadin.components.PropertySetBound

      `getProperties, hasProperty, propertyStream`

- - ### Method Detail

    - #### getInputs

          Iterable<Input<?>> getInputs()

      Gets all the `Input`s that have been bound to a property.
      Returns:
        An `Iterable` on all bound `Input`s

    - #### getInput

          <T> Optional<Input<T>> getInput(com.holonplatform.core.property.Property<T> property)

      Get the `Input` bound to given `property`, if any.
      Type Parameters:
        `T` - Property type
      Parameters:
        `property` - Property for which to get the associated `Input` (not null)
      Returns:
        Optional `Input` bound to given `property`

    - #### requireInput

          default <T> Input<T> requireInput(com.holonplatform.core.property.Property<T> property)

      Get the `Input` bound to given `property`, if any. If not available, a `Property.PropertyNotFoundException` is thrown.
      Type Parameters:
        `T` - Property type
      Parameters:
        `property` - Property for which to get the associated `Input` (not null)
      Returns:
        the `Input` bound to given `property`
      Throws:
        `com.holonplatform.core.property.Property.PropertyNotFoundException` - If no Input is available for given property

    - #### stream

          <T> Stream<PropertyBinding<T,Input<T>>> stream()

      Return a `Stream` of the properties and their bound `Input`s of this input group.
      Type Parameters:
        `T` - Property type
      Returns:
        Property-Input `PropertyBinding` stream

    - #### refresh

          default void refresh()

      Refresh the value of all available `Input`s, using current values.

    - #### refresh

          void refresh(boolean readOnly)

      Refresh the value of all available `Input`s, using current values.
      Parameters:
        `readOnly` - `true` to refresh only the `Input`s bound to read-only properties, `false` to refresh all

    - #### refresh

          <T> void refresh(com.holonplatform.core.property.Property<T> property)

      Refresh the value of the `Input` bound to given `property`, if available, using currently available values.

      For read-only properties such as `VirtualProperty`s, this has the effect to recalculate the virtual value according to the values currently set in all the binder inputs.

      Type Parameters:
        `T` - Property type
      Parameters:
        `property` - The property for which to refresh the bound `Input`

Copyright © 2019 The Holon Platform. All rights reserved.