use of com.evolveum.midpoint.web.component.data.RepositoryObjectDataProvider in project midpoint by Evolveum.
the class PageDebugList method listObjectsPerformed.
private void listObjectsPerformed(ObjectQuery query, AjaxRequestTarget target) {
DebugSearchDto dto = searchModel.getObject();
ObjectTypes selected = dto.getType();
RepositoryObjectDataProvider provider = getTableDataProvider();
provider.setQuery(createQuery(query));
if (selected != null) {
provider.setType(selected.getClassDefinition());
addOrReplaceTable(provider);
}
// save object type category to session storage, used by back button
ConfigurationStorage storage = getSessionStorage().getConfiguration();
storage.setDebugSearchDto(dto);
Table table = getListTable();
target.add((Component) table);
}
use of com.evolveum.midpoint.web.component.data.RepositoryObjectDataProvider in project midpoint by Evolveum.
the class PageDebugList method deleteSelectedConfirmed.
private void deleteSelectedConfirmed(AjaxRequestTarget target, List<DebugObjectItem> items) {
DebugConfDialogDto dto = confDialogModel.getObject();
OperationResult result = new OperationResult(OPERATION_DELETE_OBJECTS);
for (DebugObjectItem bean : items) {
WebModelServiceUtils.deleteObject(dto.getType(), bean.getOid(), ModelExecuteOptions.createRaw(), result, this);
}
result.computeStatusIfUnknown();
RepositoryObjectDataProvider provider = getTableDataProvider();
provider.clearCache();
showResult(result);
target.add((Component) getListTable());
target.add(getFeedbackPanel());
}
use of com.evolveum.midpoint.web.component.data.RepositoryObjectDataProvider in project midpoint by Evolveum.
the class PageDebugList method getTableDataProvider.
private RepositoryObjectDataProvider getTableDataProvider() {
Table tablePanel = getListTable();
DataTable table = tablePanel.getDataTable();
return (RepositoryObjectDataProvider) table.getDataProvider();
}
use of com.evolveum.midpoint.web.component.data.RepositoryObjectDataProvider in project midpoint by Evolveum.
the class PageDebugList method initLayout.
private void initLayout() {
Form main = new Form(ID_MAIN_FORM);
add(main);
DebugSearchDto dto = searchModel.getObject();
Class type = dto.getType().getClassDefinition();
RepositoryObjectDataProvider provider = new RepositoryObjectDataProvider(this, type) {
@Override
protected void saveProviderPaging(ObjectQuery query, ObjectPaging paging) {
ConfigurationStorage storage = getSessionStorage().getConfiguration();
storage.setPaging(paging);
}
};
DebugSearchDto search = searchModel.getObject();
ObjectQuery query = search.getSearch().createObjectQuery(getPrismContext());
provider.setQuery(createQuery(query));
addOrReplaceTable(provider);
PageDebugDownloadBehaviour ajaxDownloadBehavior = new PageDebugDownloadBehaviour();
main.add(ajaxDownloadBehavior);
}
Aggregations