cleanup
This commit is contained in:
parent
633015a5cc
commit
cf49243bd8
@ -32,7 +32,6 @@ public class CheckListTemplateDataPanel extends Panel {
|
|||||||
AjaxDropDown<Integer> numberDropDown;
|
AjaxDropDown<Integer> numberDropDown;
|
||||||
ChecklistTemplateProvider checklistTemplateProvider;
|
ChecklistTemplateProvider checklistTemplateProvider;
|
||||||
|
|
||||||
|
|
||||||
public CheckListTemplateDataPanel(String id) {
|
public CheckListTemplateDataPanel(String id) {
|
||||||
super(id);
|
super(id);
|
||||||
|
|
||||||
@ -61,25 +60,12 @@ public class CheckListTemplateDataPanel extends Panel {
|
|||||||
add(numberDropDown);
|
add(numberDropDown);
|
||||||
|
|
||||||
IColumn[] columns = new IColumn[2];
|
IColumn[] columns = new IColumn[2];
|
||||||
|
|
||||||
// columns[0] = new PropertyColumn<CheckListTemplate>(Model.of("Name"), "name", "name");
|
|
||||||
// columns[1] = new PropertyColumn<CheckListTemplate>(Model.of("Creator"), "creator", "creator");
|
|
||||||
|
|
||||||
columns[0] = new PropertyColumn<CheckListTemplate>(Model.of("Name"), "name");
|
columns[0] = new PropertyColumn<CheckListTemplate>(Model.of("Name"), "name");
|
||||||
columns[1] = new PropertyColumn<CheckListTemplate>(Model.of("Creator"), "creator");
|
columns[1] = new PropertyColumn<CheckListTemplate>(Model.of("Creator"), "creator");
|
||||||
|
|
||||||
// the methods below work too
|
|
||||||
// columns[0] = new PropertyColumn(new Model("Name"), "name", "name");
|
|
||||||
// columns[1] = new PropertyColumn(new Model("Creator"), "creator", "creator");
|
|
||||||
// columns[0] = new PropertyColumn<CheckListTemplate>(new Model("Name"), "name", "name");
|
|
||||||
// columns[1] = new PropertyColumn<CheckListTemplate>(new Model("Creator"), "creator", "creator");
|
|
||||||
|
|
||||||
table = new DataTable<CheckListTemplate>("datatable", columns, checklistTemplateProvider = new ChecklistTemplateProvider(), 10);
|
table = new DataTable<CheckListTemplate>("datatable", columns, checklistTemplateProvider = new ChecklistTemplateProvider(), 10);
|
||||||
table.setOutputMarkupId(true);
|
table.setOutputMarkupId(true);
|
||||||
table.addBottomToolbar(navigationToolbar = new NavigationToolbar(table));
|
table.addBottomToolbar(navigationToolbar = new NavigationToolbar(table));
|
||||||
// none of these work
|
|
||||||
// table.add(new HeadersToolbar(table));
|
|
||||||
// table.add(new HeadersToolbar(table, null));
|
|
||||||
table.addTopToolbar(new HeadersToolbar(table, null));
|
table.addTopToolbar(new HeadersToolbar(table, null));
|
||||||
add(table);
|
add(table);
|
||||||
|
|
||||||
@ -95,13 +81,11 @@ public class CheckListTemplateDataPanel extends Panel {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Iterator<? extends CheckListTemplate> iterator(int first, int count) {
|
public Iterator<? extends CheckListTemplate> iterator(int first, int count) {
|
||||||
// return checklistTemplateService.findAll(new PageRequest(table.getCurrentPage(), count)).iterator();
|
|
||||||
return checklistTemplateService.find(filterString, new PageRequest(table.getCurrentPage(), count)).iterator();
|
return checklistTemplateService.find(filterString, new PageRequest(table.getCurrentPage(), count)).iterator();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int size() {
|
public int size() {
|
||||||
// return safeLongToInt(checklistTemplateService.count());
|
|
||||||
return safeLongToInt(checklistTemplateService.count(filterString));
|
return safeLongToInt(checklistTemplateService.count(filterString));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user