Search in sources :

Example 1 with RepositoryObjectDataProvider

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);
}
Also used : RepositoryObjectDataProvider(com.evolveum.midpoint.web.component.data.RepositoryObjectDataProvider) DataTable(org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable) Table(com.evolveum.midpoint.web.component.data.Table) ConfigurationStorage(com.evolveum.midpoint.web.session.ConfigurationStorage) DebugSearchDto(com.evolveum.midpoint.web.page.admin.configuration.dto.DebugSearchDto) ObjectTypes(com.evolveum.midpoint.schema.constants.ObjectTypes)

Example 2 with RepositoryObjectDataProvider

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());
}
Also used : RepositoryObjectDataProvider(com.evolveum.midpoint.web.component.data.RepositoryObjectDataProvider) DebugConfDialogDto(com.evolveum.midpoint.web.page.admin.configuration.dto.DebugConfDialogDto) OperationResult(com.evolveum.midpoint.schema.result.OperationResult) DebugObjectItem(com.evolveum.midpoint.web.page.admin.configuration.dto.DebugObjectItem)

Example 3 with RepositoryObjectDataProvider

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();
}
Also used : DataTable(org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable) DataTable(org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable) Table(com.evolveum.midpoint.web.component.data.Table) RepositoryObjectDataProvider(com.evolveum.midpoint.web.component.data.RepositoryObjectDataProvider)

Example 4 with RepositoryObjectDataProvider

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);
}
Also used : ObjectPaging(com.evolveum.midpoint.prism.query.ObjectPaging) RepositoryObjectDataProvider(com.evolveum.midpoint.web.component.data.RepositoryObjectDataProvider) ConfigurationStorage(com.evolveum.midpoint.web.session.ConfigurationStorage) Form(org.apache.wicket.markup.html.form.Form) PageDebugDownloadBehaviour(com.evolveum.midpoint.web.page.admin.configuration.component.PageDebugDownloadBehaviour) DebugSearchDto(com.evolveum.midpoint.web.page.admin.configuration.dto.DebugSearchDto) ObjectQuery(com.evolveum.midpoint.prism.query.ObjectQuery)

Aggregations

RepositoryObjectDataProvider (com.evolveum.midpoint.web.component.data.RepositoryObjectDataProvider)4 Table (com.evolveum.midpoint.web.component.data.Table)2 DebugSearchDto (com.evolveum.midpoint.web.page.admin.configuration.dto.DebugSearchDto)2 ConfigurationStorage (com.evolveum.midpoint.web.session.ConfigurationStorage)2 DataTable (org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable)2 ObjectPaging (com.evolveum.midpoint.prism.query.ObjectPaging)1 ObjectQuery (com.evolveum.midpoint.prism.query.ObjectQuery)1 ObjectTypes (com.evolveum.midpoint.schema.constants.ObjectTypes)1 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)1 PageDebugDownloadBehaviour (com.evolveum.midpoint.web.page.admin.configuration.component.PageDebugDownloadBehaviour)1 DebugConfDialogDto (com.evolveum.midpoint.web.page.admin.configuration.dto.DebugConfDialogDto)1 DebugObjectItem (com.evolveum.midpoint.web.page.admin.configuration.dto.DebugObjectItem)1 Form (org.apache.wicket.markup.html.form.Form)1