Hi,
I got a rather dumb issue. As I've been using Wicket only for 2 weeks,
I'm pretty sure that my issue is just a misuse more than a bug.
I implemented a Custom list by inheriting PropertyViewList. This
custom list is then placed into a Panel, which it is itself added to
the Page.
// The panel constructor
public MapResultsPanel(String id, Map<String,
List<ServiceTreeValue>> results) {
super(id);
// Construct the list of Entry
List<MyEntry> myEntries = new ArrayList<MyEntry>();
for (Entry<String, List<ServiceTreeValue>> servicesEntry :
results.entrySet()) {
myEntries.add(new
MyEntry(servicesEntry.getKey(),servicesEntry.getValue()));
}
// Here comes my custom list
Entries e = new Entries("entryList", myEntries);
// Adding entries to the panel
add(e);
}
class Entries extends PropertyListView<MyEntry> {
private static final long serialVersionUID = 1L;
private final List<MyEntry> entries;
public Entries(String id, List<MyEntry> entries) {
super(id);
this.entries = entries;
}
// This is not invoked at run time ...
�...@override
protected void populateItem(ListItem<MyEntry> item) {
for (MyEntry entry : entries) {
item.add(new Label("key", entry.id));
// ...
}
}
}
However, at run time, nothing is displayed on my page and if I debug
the populateItem() method on my custom list implementation is not
called. Somebody on IRC suspected that my model might be empty but how
comes ?
I posted this code on paste bin also : http://pastebin.com/vEVrmDM4
(in case you want to tweak it)
Thanks for any help you can gave me, because I have exhausted most of
my options here...
--
Romain PELISSE,
"The trouble with having an open mind, of course, is that people will
insist on coming along and trying to put things in it" -- Terry
Pratchett
http://belaran.eu/
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]