|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.markup.repeater.data.ListDataProvider<T>
T - public class ListDataProvider<T extends Serializable>
Allows the use of lists with DataView. The only requirement is that either list items
must be serializable or model(Object) needs to be overridden to provide the proper model
implementation.
| Constructor Summary | |
|---|---|
ListDataProvider()
Constructs an empty provider. |
|
ListDataProvider(List<T> list)
|
|
| Method Summary | |
|---|---|
void |
detach()
Detaches model after use. |
protected List<T> |
getData()
Subclass to lazy load the list |
Iterator<? extends T> |
iterator(int first,
int count)
Gets an iterator for the subset of total data |
IModel<T> |
model(T object)
Callback used by the consumer of this data provider to wrap objects retrieved from IDataProvider.iterator(int, int) with a model (usually a detachable one). |
int |
size()
Gets total number of items in the collection represented by the DataProvider |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ListDataProvider()
public ListDataProvider(List<T> list)
list - the list used as dataprovider for the dataview| Method Detail |
|---|
protected List<T> getData()
public Iterator<? extends T> iterator(int first,
int count)
IDataProvider
iterator in interface IDataProvider<T extends Serializable>first - first row of datacount - minimum number of elements to retrieve
IDataProvider.iterator(int, int)public int size()
IDataProvider
size in interface IDataProvider<T extends Serializable>IDataProvider.size()public IModel<T> model(T object)
IDataProviderIDataProvider.iterator(int, int) with a model (usually a detachable one).
model in interface IDataProvider<T extends Serializable>object - the object that needs to be wrapped
IDataProvider.model(Object)public void detach()
IDetachable
detach in interface IDetachableIDetachable.detach()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||