|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Interface used to provide data to data views.
Note that if the IDataProvider implementation implements IDetachable
interface, the IDetachable.detach() method will be called at the end
of request.
Example:
class UsersProvider implements IDataProvider() {
Iterator iterator(int first, int count) {
((MyApplication)Application.get()).getUserDao().iterator(first, count);
}
int size() {
((MyApplication)Application.get()).getUserDao().getCount();
}
IModel model(Object object) {
return new DetachableUserModel((User)object);
}
}
IDetachableDataViewBase,
DataView,
GridView| Method Summary | |
java.util.Iterator |
iterator(int first,
int count)
Gets an iterator for the subset of total data |
wicket.model.IModel |
model(java.lang.Object object)
Callback used by the consumer of this data provider to wrap objects retrieved from iterator(int, int) with a model (usually a
detachable one). |
int |
size()
Gets total number of items in the collection represented by the DataProvider |
| Method Detail |
public java.util.Iterator iterator(int first,
int count)
first - first row of datacount - minumum number of elements to retrieve
public int size()
public wicket.model.IModel model(java.lang.Object object)
iterator(int, int) with a model (usually a
detachable one).
object - the object that needs to be wrapped
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||