use of com.evolveum.midpoint.web.component.data.TableHeadersToolbar in project midpoint by Evolveum.
the class CheckBoxHeaderColumn method findCheckBoxColumnHeader.
public static CheckBoxPanel findCheckBoxColumnHeader(DataTable table) {
WebMarkupContainer topToolbars = table.getTopToolbars();
ComponentHierarchyIterator iterator = topToolbars.visitChildren(TableHeadersToolbar.class);
if (!iterator.hasNext()) {
return null;
}
TableHeadersToolbar toolbar = (TableHeadersToolbar) iterator.next();
// simple attempt to find checkbox which is header for our column
// todo: this search will fail if there are more checkbox header columns (which is not supported now,
// because Selectable.F_SELECTED is hardcoded all over the place...
iterator = toolbar.visitChildren(CheckBoxPanel.class);
while (iterator.hasNext()) {
Component c = iterator.next();
if (!c.getOutputMarkupId()) {
continue;
}
return (CheckBoxPanel) c;
}
return null;
}
Aggregations