Class 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:
    Serialized Form
    • Constructor Detail

      • ListModel

        public ListModel​(List<V> values)
    • Method Detail

      • 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