> why? what is different between a 10 or a 50 item song panel? the
number
> of items? you should anyhow use a ListView which repeats the "her is
the
> song"-block as many times as you want to..

It is using a ListView - the desire was to provide an easy way for the
UI guy to specify a row count in the markup.

> > Let's say we make
> >
> > SongChartTop10Panel and SongChartTop50Panel
> >
> > (with .java and .html markup for each)
> >
> > Now he says he wants to make a top 20 list for one page and a top 40
> > list for another page... the inefficiency and non OO nature of this
> > approach becomes apparent.
> 
> why do you make this?

They each derive from SongChartTopPanel and invoke the constructor with
a different row count - but without parameterization and using standard
simple wicket devices (i.e. not component resolvers) then we need a
separate markup and separate .java class for each panel that has a
different number of songs displayed.

> > If a simple parameter were able to be passed to the panel we could
reuse
> > that panel code to show anywhere from 1 to n songs.

Yes but you'd still require a separate markup for each one I would think
- without going the with component resolver approach.

> If you change numberOfSongs to a Model.. the User could change the
> number (Form, Link,.. anything).

The web designer will have a nice 'Top 10' image above the panel so I
didn't want to put it in the hands of the user who might change the
rowcount to 13 or something. 'Top 13 songs around the country this week'
doesn't sound right - especially if the image above it says 'Top 10'.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to