a)
class mypanel extends panel {
mypanel () {
add(new listview() { onpopulateitem(item) {
mypanel.this.onpopulateitem(): }{});
}
protected abstract onpopulateitem(item);
}
b) instead of trying to encapsulate both the listview and the button
in the component make a reusable button
class
I want to add several "collapsable" ListViews: a listview paired with a
button to toggle showing either the full list or the fist N elements.
But each listview's populateItem and corresponding markup will be different.
If I write a Wicket Panel, I'm not only "locked-in" to one set of markup.
I