Class FIXGRIDBeanListBinding<T>

All Implemented Interfaces:
Serializable, IConfiguredByLayout, IFIXGRIDBinding<FIXGRIDBeanItem<T>>, IListWithChangeIndexListener, IDynamicContentBindingObject

public class FIXGRIDBeanListBinding<T> extends FIXGRIDListBinding<FIXGRIDBeanItem<T>>
FIXGRIDListBinding implementation that directly renders a List of beans objects.
The class provides methods for adding and removing items from the list that can be directly bound by user interface components.
See Also:
  • Constructor Details

    • FIXGRIDBeanListBinding

      public FIXGRIDBeanListBinding()
    • FIXGRIDBeanListBinding

      public FIXGRIDBeanListBinding(boolean changeInndexIsSupported)
    • FIXGRIDBeanListBinding

      public FIXGRIDBeanListBinding(Class beanClass)
      Use this constructor if you use the default adding of items. The class requires to provide a constructor without parameter.
      Parameters:
      beanClass - Class of bean that is managed inside. The class needs to be passed so that new instances can be generated during the default adding of items.
    • FIXGRIDBeanListBinding

      public FIXGRIDBeanListBinding(Class beanClass, Class rowItemClass)
      Additional parameter "rowItemClass" is the row item that wraps each bean that is shown within the grid.
    • FIXGRIDBeanListBinding

      public FIXGRIDBeanListBinding(Class beanClass, boolean changeInndexIsSupported)
  • Method Details

    • showList

      public void showList(List<T> beanList)
      Displays the list of beans within the grid. The list passed from now on is manipulated by add/remove operations that may be called by the user interface.
    • wrapBean

      public FIXGRIDBeanItem<T> wrapBean(T bean)
    • onRemoveSelectedItems

      public void onRemoveSelectedItems(javax.faces.event.ActionEvent ae)
      Default method for removing selected beans. May be directly called by user interface components.
    • onAddItem

      public void onAddItem(javax.faces.event.ActionEvent ae)
      Default method for adding a new bean. May be directly called by user interface components. This method will only work if the beanClass is passed at construction point of time.
    • getRemovedBeans

      public Set<T> getRemovedBeans()
      All beans that were removed.
    • getAddedBeans

      public Set<T> getAddedBeans()
      All beans that were added.
    • reset

      public void reset()
      Resets lists that hold added/removed beans.
    • createBean

      public T createBean()
      Creates a bean using a constructor without any parameters. You may override this method in case you want to control the creation of objects on your own.
    • getThis

      public FIXGRIDBeanListBinding<T> getThis()