use of org.apache.wicket.extensions.markup.html.repeater.data.table.NoRecordsToolbar in project wicket by apache.
the class TableTreePage method createTree.
@Override
protected AbstractTree<Foo> createTree(FooProvider provider, IModel<Set<Foo>> state) {
List<IColumn<Foo, String>> columns = createColumns();
final TableTree<Foo, String> tree = new TableTree<Foo, String>("tree", columns, provider, Integer.MAX_VALUE, state) {
private static final long serialVersionUID = 1L;
@Override
protected Component newContentComponent(String id, IModel<Foo> model) {
return TableTreePage.this.newContentComponent(id, model);
}
@Override
protected Item<Foo> newRowItem(String id, int index, IModel<Foo> model) {
return new OddEvenItem<>(id, index, model);
}
};
tree.getTable().addTopToolbar(new HeadersToolbar<>(tree.getTable(), null));
tree.getTable().addBottomToolbar(new NoRecordsToolbar(tree.getTable()));
return tree;
}
Aggregations