add(browserCallback);
return browserCallback;
}
private void initFilter(final WebMarkupContainer historyContainer) {
final TextModel filterFieldModel = new TextModel();
final TextField<String> filterField = new TextField<>("filterField", filterFieldModel);
filterField.setOutputMarkupId(true);
filterField.add(new FilterBehaviour(filterFieldModel, historyContainer));
add(filterField);
AjaxFallbackLink<Void> resetFilter = new AjaxFallbackLink<Void>("resetFilter") {
@Override
public void onClick(AjaxRequestTarget target) {
ImmutableList<QueryEntry> historyToUpdate = historyService.read().copyAsList();
rebuildHistoryTable(historyToUpdate, null);
filterFieldModel.setObject("");
target.add(filterField);
target.add(historyContainer);
target.appendJavaScript("initResetButton();");
}
};