On 1/8/07, Jean-Baptiste Quenot <[EMAIL PROTECTED]> wrote:

We find  IDataProvider handy  for providing  data...  As  the name
suggests.  It is useful even outside of DataView, mainly in Wicket
Contrib Dojo.


glad to hear it :)

in  2.0 i  plan  on refactoring  the  refreshing view,  removing
> getItemModels  and  instead  make   its  model  object  of  type
> Iterator<IModel>

What is strange is that RefreshingView expects an Iterator<IModel>
whereas  IDataProvider expects  an  Iterator<Object>, and  another
method  model(Object) to  get an  IModel.  I  think data  could be
provided in a uniform way throughout the repeater package.

IMO  it   would  be   clearer  to   have  RefreshingView   use  an
IDataProvider


well, if you look at it closer the refreshingview has no concept nor
overhead of paging. it is a simple repeater that is fed with an iterator. it
is meant for small datasets.

the dataprovider was designed to work with large datasets, thus a separate
size() method and iterator() that takes a range. so to impose this onto
simpler usecases which do not require paging is silly imho. roughly the
hierarchy goes: refreshingview<-pageablerefreshingview<-dataview.

does this make sense?

-igor





.
--
     Jean-Baptiste Quenot
aka  John Banana   Qwerty
http://caraldi.com/jbq/

Reply via email to