Hello,
For no apparent reason the listview is not updating when i targeted it. im
using wicket 1.4.1.
here is the code:
final WebMarkupContainer resultcontainer = new
WebMarkupContainer("resultcontainer");
add(resultcontainer.setOutputMarkupId(true));
final ListView<CustomFileDescription> files = new
ListView<CustomFileDescription>("files", results)
{
@Override
protected void populateItem(ListItem<CustomFileDescription> item)
{
final CustomFileDescription fileDesc = item.getModelObject();
item.setModel(new
CompoundPropertyModel<CustomFileDescription>(fileDesc));
item.add(new Label("name"));
item.add(new Label("lastModified"));
}
};
//files.setReuseItems(true);
resultcontainer.add(files);
final List<CustomFileDescription> results =
fileSearchService.search(query.getDefaultModelObjectAsString());
System.out.println(results.size());
files.setDefaultModelObject(results);
target.addComponent(resultcontainer);
...the results are just appending to each other.
Thanks a lot.
Cheers.