use of org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable in project midpoint by Evolveum.
the class PageCreatedReports method getTableDataProvider.
private ObjectDataProvider getTableDataProvider() {
Table tablePanel = getReportOutputTable();
DataTable table = tablePanel.getDataTable();
return (ObjectDataProvider) table.getDataProvider();
}
use of org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable in project midpoint by Evolveum.
the class ObjectSelectionPanel method updateTableByTypePerformed.
public void updateTableByTypePerformed(AjaxRequestTarget target, Class<? extends ObjectType> newType) {
this.objectType = newType;
TablePanel table = getTablePanel();
DataTable dataTable = table.getDataTable();
ObjectDataProvider provider = (ObjectDataProvider) dataTable.getDataProvider();
provider.setType(objectType);
target.add(this, WebComponentUtil.getPageBase(this).getFeedbackPanel(), table);
}
use of org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable in project midpoint by Evolveum.
the class OrgUnitAddDeletePopup method setState.
public void setState(ActionState state, AjaxRequestTarget target) {
this.state = state;
AjaxButton actionButton = (AjaxButton) getContent().get(ID_BUTTON_ACTION);
actionButton.setModel(createActionButtonStringResource());
actionButton.add(new AttributeAppender("class", getActionButtonClass()));
target.add(actionButton);
TablePanel panel = getTable();
DataTable table = panel.getDataTable();
ObjectDataProvider provider = (ObjectDataProvider) table.getDataProvider();
provider.setQuery(getDataProviderQuery());
target.add(panel);
}
use of org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable in project midpoint by Evolveum.
the class CountToolbar method createModel.
private IModel<String> createModel() {
return new LoadableModel<String>() {
@Override
protected String load() {
long from = 0;
long to = 0;
long count = 0;
IPageable pageable = getTable();
if (pageable instanceof DataViewBase) {
DataViewBase view = (DataViewBase) pageable;
from = view.getFirstItemOffset() + 1;
to = from + view.getItemsPerPage() - 1;
long itemCount = view.getItemCount();
if (to > itemCount) {
to = itemCount;
}
count = itemCount;
} else if (pageable instanceof DataTable) {
DataTable table = (DataTable) pageable;
from = table.getCurrentPage() * table.getItemsPerPage() + 1;
to = from + table.getItemsPerPage() - 1;
long itemCount = table.getItemCount();
if (to > itemCount) {
to = itemCount;
}
count = itemCount;
}
if (count > 0) {
PageBase.createStringResourceStatic(CountToolbar.this, "CountToolbar.label", new Object[] { from, to, count });
}
return PageBase.createStringResourceStatic(CountToolbar.this, "CountToolbar.noFound").getString();
}
};
}
use of org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable in project midpoint by Evolveum.
the class PageConnectorHosts method searchHostPerformed.
private void searchHostPerformed(ObjectQuery query, AjaxRequestTarget target) {
target.add(getFeedbackPanel());
Table panel = getConnectorHostTable();
DataTable table = panel.getDataTable();
ObjectDataProvider provider = (ObjectDataProvider) table.getDataProvider();
provider.setQuery(query);
provider.setOptions(SelectorOptions.createCollection(GetOperationOptions.createNoFetch()));
target.add((Component) panel);
}
Aggregations