Class ListModel<T,V>

java.lang.Object
org.apache.wicket.model.LoadableDetachableModel<List<T>>
ontopoly.models.ListModel<T,V>
All Implemented Interfaces:
Serializable, org.apache.wicket.IClusterable, org.apache.wicket.model.IDetachable, org.apache.wicket.model.IModel<List<T>>

public abstract class ListModel<T,V> extends org.apache.wicket.model.LoadableDetachableModel<List<T>>
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    ListModel(List<V> values)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract T
    getObjectFor(V object)
    This method will be called for each value in the containing collection.
    protected List<T>
     
    protected List<T>
    makeCollection(int size)
    Make new collection instance.

    Methods inherited from class org.apache.wicket.model.LoadableDetachableModel

    detach, getObject, isAttached, onAttach, onDetach, setObject, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ListModel

      public ListModel(List<V> values)
  • Method Details

    • load

      protected List<T> load()
      Specified by:
      load in class org.apache.wicket.model.LoadableDetachableModel<List<T>>
    • makeCollection

      protected List<T> makeCollection(int size)
      Make new collection instance.
      Parameters:
      size - the size of the collection to create.
      Returns:
      return new collection
    • getObjectFor

      protected abstract T getObjectFor(V object)
      This method will be called for each value in the containing collection. The result will be part of the final model collection.
      Parameters:
      object - the object to wrap
      Returns:
      the wrapper object