simple answer is "because" :)

if you look at the class hieararchy you will see that every repeater builds on the other.

at the top we have RepeatingView - this is a very basic repeater. you add items to it - those items are rendered using the repeater's markup. thats all it does.

below that we have a RefreshingView - this view takes an iterator<imodel> and lets user generate items much based on that iterator much like listview. items are also refreshed every request unlike the repeatingview. the big differences when compared to listview is that refreshing view works with iterators where as listview is limited to lists. another big difference is that refreshingview makes you wrap each iterator item in a model where as listview doesnot (you have to override getlistitemmodel() to do that in a listview) - by doing this you avoid all kinds of problems when dealing with non-static collections. it is easy to use any iterator by using ModelIteratorAdapter.

below that we have a AbstractPageableView - this is like refreshingview + paging support

below that we have DataView  GridView

DataView- this is a pageable view that is populated via idataprovider instead of an iterator<model> which makes working with databases much simpler

GridView makes it simple to show an iterator in a grid where each row can have a max number of items

below the DataView we have DataGridView - this is a view that extends the dataview with the idea of populators and makes displaying tabular data easy by letting populators populate each cell instead of you doing that in populateitem() yourself. the idea is that depending on rolls/whatnot you can vary the list of populators and simplify the logic.

then there is also a datatable - the mcdaddy if you will - datatable extends the tree not by inheritance but by delegation. it wraps a datagridview and provides all the markup for you so you dont have to. it adds support for interchangeable toolbars like sortable headers, filters, pagers, etc.

i think thats all of them. so why there are so many? because there are many uscases having a hierarchy like this lets you pick a component that delivers the exact functionality you need. personally i hate using components that have a bunch of extra features im not going to be using for my usecase - so maybe thats why i structured the repeaters like this when i built them. at the end i think everyone wins.

hope this helps, mind cleaning this up and making a wiki page? :)

-Igor





On 8/28/06, Huy Do < [EMAIL PROTECTED]> wrote:
Hi,

Just a something I'm a bit confused about being a wicket hobbyist. Why
does wicket provide so many different options for the display of tables
(as seen in the wicket contrib examples). It makes it hard to figure out
which is the correct/or suitable method.

Any guidance ?

Also, are there any examples of producing forms like the following ?

eg. I have domain Order and Order Lines.

I want to create a form to edit both

order.order_no
order.date
...
...

order.line[0].item_code
order.line[0].item_qty
...
...
...
order.line[x].item_qty

Thanks,

Huy

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to