ontopoly.models
Class ListModel<T,V>

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

public abstract class ListModel<T,V>
extends org.apache.wicket.model.LoadableDetachableModel<java.util.List<T>>

See Also:
Serialized Form

Constructor Summary
ListModel(java.util.List<V> values)
           
 
Method Summary
protected abstract  T getObjectFor(V object)
          This method will be called for each value in the containing collection.
protected  java.util.List<T> load()
           
protected  java.util.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 Detail

ListModel

public ListModel(java.util.List<V> values)
Method Detail

load

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

makeCollection

protected java.util.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


Copyright © 2000-2012 Ontopia.