Search in sources :

Example 1 with ConfigurationStorage

use of com.evolveum.midpoint.web.session.ConfigurationStorage in project midpoint by Evolveum.

the class PageAccounts method searchPerformed.

private void searchPerformed(AjaxRequestTarget target) {
    refreshSyncTotalsModels();
    ObjectQuery query = createObjectQuery();
    TablePanel panel = getAccountsTable();
    DataTable table = panel.getDataTable();
    ObjectDataProvider provider = (ObjectDataProvider) table.getDataProvider();
    provider.setQuery(query);
    ConfigurationStorage storage = getSessionStorage().getConfiguration();
    storage.setAccountSearchDto(searchModel.getObject());
    storage.setAccountDetailsPaging(null);
    panel.setCurrentPage(null);
    target.add(getTotalsPanel());
    target.add(getFeedbackPanel());
    target.add(getAccountsContainer());
}
Also used : DataTable(org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable) ConfigurationStorage(com.evolveum.midpoint.web.session.ConfigurationStorage) ObjectDataProvider(com.evolveum.midpoint.web.component.data.ObjectDataProvider) ObjectQuery(com.evolveum.midpoint.prism.query.ObjectQuery) TablePanel(com.evolveum.midpoint.web.component.data.TablePanel)

Example 2 with ConfigurationStorage

use of com.evolveum.midpoint.web.session.ConfigurationStorage in project midpoint by Evolveum.

the class PageAccounts method clearSearchPerformed.

private void clearSearchPerformed(AjaxRequestTarget target) {
    refreshSyncTotalsModels();
    searchModel.setObject(new AccountDetailsSearchDto());
    TablePanel panel = getAccountsTable();
    DataTable table = panel.getDataTable();
    ObjectDataProvider provider = (ObjectDataProvider) table.getDataProvider();
    provider.setQuery(ObjectQuery.createObjectQuery(createResourceQueryFilter()));
    ConfigurationStorage storage = getSessionStorage().getConfiguration();
    storage.setAccountSearchDto(searchModel.getObject());
    storage.setAccountDetailsPaging(null);
    panel.setCurrentPage(storage.getAccountDetailsPaging());
    target.add(getTotalsPanel());
    target.add(getSearchPanel());
    target.add(getAccountsContainer());
}
Also used : AccountDetailsSearchDto(com.evolveum.midpoint.web.page.admin.configuration.dto.AccountDetailsSearchDto) DataTable(org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable) ConfigurationStorage(com.evolveum.midpoint.web.session.ConfigurationStorage) ObjectDataProvider(com.evolveum.midpoint.web.component.data.ObjectDataProvider) TablePanel(com.evolveum.midpoint.web.component.data.TablePanel)

Example 3 with ConfigurationStorage

use of com.evolveum.midpoint.web.session.ConfigurationStorage 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 4 with ConfigurationStorage

use of com.evolveum.midpoint.web.session.ConfigurationStorage in project midpoint by Evolveum.

the class PageDebugList method create.

private void create(RepositoryObjectDataProvider provider) {
    Form mainForm = (Form) get(ID_MAIN_FORM);
    BoxedTablePanel<DebugObjectItem> table = new BoxedTablePanel<>(ID_TABLE, provider, createColumns(), UserProfileStorage.TableId.CONF_DEBUG_LIST_PANEL) {

        private static final long serialVersionUID = 1L;

        @Override
        protected WebMarkupContainer createHeader(String headerId) {
            DebugSearchFragment headerFragment = new DebugSearchFragment(headerId, ID_TABLE_HEADER, PageDebugList.this, searchModel, showAllItemsModel) {

                private static final long serialVersionUID = 1L;

                @Override
                protected void searchPerformed(AjaxRequestTarget target) {
                    listObjectsPerformed(target);
                }
            };
            headerFragment.setOutputMarkupId(true);
            return headerFragment;
        }
    };
    table.setOutputMarkupId(true);
    ConfigurationStorage storage = getSessionStorage().getConfiguration();
    table.setCurrentPage(storage.getPaging());
    mainForm.addOrReplace(table);
}
Also used : DebugSearchFragment(com.evolveum.midpoint.web.page.admin.configuration.component.DebugSearchFragment) AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) ConfigurationStorage(com.evolveum.midpoint.web.session.ConfigurationStorage) MidpointForm(com.evolveum.midpoint.web.component.form.MidpointForm) Form(org.apache.wicket.markup.html.form.Form) DebugObjectItem(com.evolveum.midpoint.web.page.admin.configuration.dto.DebugObjectItem) BoxedTablePanel(com.evolveum.midpoint.web.component.data.BoxedTablePanel)

Example 5 with ConfigurationStorage

use of com.evolveum.midpoint.web.session.ConfigurationStorage in project midpoint by Evolveum.

the class PageDebugList method addOrReplaceTable.

private void addOrReplaceTable(RepositoryObjectDataProvider provider) {
    Form mainForm = (Form) get(ID_MAIN_FORM);
    BoxedTablePanel table = new BoxedTablePanel(ID_TABLE, provider, initColumns(provider.getType()), UserProfileStorage.TableId.CONF_DEBUG_LIST_PANEL, (int) getItemsPerPage(UserProfileStorage.TableId.CONF_DEBUG_LIST_PANEL)) {

        @Override
        protected WebMarkupContainer createHeader(String headerId) {
            return new SearchFragment(headerId, ID_TABLE_HEADER, PageDebugList.this, searchModel, resourcesModel);
        }
    };
    table.setOutputMarkupId(true);
    ConfigurationStorage storage = getSessionStorage().getConfiguration();
    table.setCurrentPage(storage.getPaging());
    mainForm.addOrReplace(table);
}
Also used : ConfigurationStorage(com.evolveum.midpoint.web.session.ConfigurationStorage) Form(org.apache.wicket.markup.html.form.Form) BoxedTablePanel(com.evolveum.midpoint.web.component.data.BoxedTablePanel)

Aggregations

ConfigurationStorage (com.evolveum.midpoint.web.session.ConfigurationStorage)6 DataTable (org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable)4 BoxedTablePanel (com.evolveum.midpoint.web.component.data.BoxedTablePanel)2 ObjectDataProvider (com.evolveum.midpoint.web.component.data.ObjectDataProvider)2 Table (com.evolveum.midpoint.web.component.data.Table)2 TablePanel (com.evolveum.midpoint.web.component.data.TablePanel)2 Form (org.apache.wicket.markup.html.form.Form)2 ObjectQuery (com.evolveum.midpoint.prism.query.ObjectQuery)1 ObjectTypes (com.evolveum.midpoint.schema.constants.ObjectTypes)1 RepositoryObjectDataProvider (com.evolveum.midpoint.web.component.data.RepositoryObjectDataProvider)1 MidpointForm (com.evolveum.midpoint.web.component.form.MidpointForm)1 DebugSearchFragment (com.evolveum.midpoint.web.page.admin.configuration.component.DebugSearchFragment)1 AccountDetailsSearchDto (com.evolveum.midpoint.web.page.admin.configuration.dto.AccountDetailsSearchDto)1 DebugObjectItem (com.evolveum.midpoint.web.page.admin.configuration.dto.DebugObjectItem)1 DebugSearchDto (com.evolveum.midpoint.web.page.admin.configuration.dto.DebugSearchDto)1 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)1