Models: http://wicket.apache.org/guide/guide/modelsforms.html
Data Providers (ie: Repeaters): http://wicket.apache.org/guide/guide/repeaters.html Long story short, a repeater's DataProvider gives you a single items model. A model who wraps a collection, gives you a collection of items for a single component. On Thursday, May 8, 2014, Patrick Davids <patrick.dav...@nubologic.com> wrote: > Hi all, > > what I often think about, and I cannot really say is; when to use Model > or DataProvider as data providing object for components they repeat some > thing? > > Javadoc says, DataProvider are (good) for DataViews. > Hmm... ok, and they allow easer iterating (first index, count). > > I also can achieve this by using a LoadableDetachableModel<List<>> > combined with a ModelIteratorAdapater. > > Both have detaching logic... both featuring extension, both have a sort > of "load"-method (getObject() vs. getData()). > > Sometimes I think, they are so similar to each other... where is the key > difference? > > Would be cool if some of yours just reply his "two cents" of daily > programming experience... so I can get some new point of views. > > When do you use DataProvider or Model<List<>>? > Did you experienced the same, not to exactly know which one you will use > for your new page/panel/component? > And often think about pro and cons using it with RepeatingViews? And > later on, you see... "I could have used both... hmm..." > > thanx a lot for feedback and kind regards > Patrick > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org <javascript:;> > For additional commands, e-mail: users-h...@wicket.apache.org<javascript:;> > >