Search in sources :

Example 1 with CertWorkItemDtoProvider

use of com.evolveum.midpoint.web.page.admin.certification.dto.CertWorkItemDtoProvider in project midpoint by Evolveum.

the class PageCertDecisions method initLayout.

//endregion
//region Layout
private void initLayout() {
    Form mainForm = new Form(ID_MAIN_FORM);
    add(mainForm);
    CertWorkItemDtoProvider provider = createProvider();
    int itemsPerPage = (int) getItemsPerPage(UserProfileStorage.TableId.PAGE_CERT_DECISIONS_PANEL);
    BoxedTablePanel<CertWorkItemDto> table = new BoxedTablePanel<CertWorkItemDto>(ID_DECISIONS_TABLE, provider, initColumns(), UserProfileStorage.TableId.PAGE_CERT_DECISIONS_PANEL, itemsPerPage) {

        @Override
        protected WebMarkupContainer createHeader(String headerId) {
            return new SearchFragment(headerId, ID_TABLE_HEADER, PageCertDecisions.this, showNotDecidedOnlyModel);
        }
    };
    table.setShowPaging(true);
    table.setOutputMarkupId(true);
    // really don't know why this is necessary, as e.g. in PageRoles the size setting works without it
    table.setItemsPerPage(itemsPerPage);
    mainForm.add(table);
// adding this on outer feedback panel prevents displaying the error messages
//addVisibleOnWarningBehavior(getMainFeedbackPanel());
//addVisibleOnWarningBehavior(getTempFeedbackPanel());
}
Also used : CertWorkItemDtoProvider(com.evolveum.midpoint.web.page.admin.certification.dto.CertWorkItemDtoProvider) Form(org.apache.wicket.markup.html.form.Form) BoxedTablePanel(com.evolveum.midpoint.web.component.data.BoxedTablePanel) CertWorkItemDto(com.evolveum.midpoint.web.page.admin.certification.dto.CertWorkItemDto)

Example 2 with CertWorkItemDtoProvider

use of com.evolveum.midpoint.web.page.admin.certification.dto.CertWorkItemDtoProvider in project midpoint by Evolveum.

the class PageCertDecisions method createProvider.

//region Data
private CertWorkItemDtoProvider createProvider() {
    CertWorkItemDtoProvider provider = new CertWorkItemDtoProvider(PageCertDecisions.this);
    provider.setQuery(createCaseQuery());
    provider.setCampaignQuery(createCampaignQuery());
    provider.setReviewerOid(getCurrentUserOid());
    // default sorting
    provider.setSort(SearchingUtils.CURRENT_REVIEW_DEADLINE, SortOrder.ASCENDING);
    return provider;
}
Also used : CertWorkItemDtoProvider(com.evolveum.midpoint.web.page.admin.certification.dto.CertWorkItemDtoProvider)

Example 3 with CertWorkItemDtoProvider

use of com.evolveum.midpoint.web.page.admin.certification.dto.CertWorkItemDtoProvider in project midpoint by Evolveum.

the class PageCertDecisions method searchFilterPerformed.

private void searchFilterPerformed(AjaxRequestTarget target) {
    ObjectQuery query = createCaseQuery();
    Table panel = getDecisionsTable();
    DataTable table = panel.getDataTable();
    CertWorkItemDtoProvider provider = (CertWorkItemDtoProvider) table.getDataProvider();
    provider.setQuery(query);
    provider.setNotDecidedOnly(Boolean.TRUE.equals(showNotDecidedOnlyModel.getObject()));
    table.setCurrentPage(0);
    target.add(getFeedbackPanel());
    target.add((Component) getDecisionsTable());
}
Also used : DataTable(org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable) Table(com.evolveum.midpoint.web.component.data.Table) DataTable(org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable) CertWorkItemDtoProvider(com.evolveum.midpoint.web.page.admin.certification.dto.CertWorkItemDtoProvider) ObjectQuery(com.evolveum.midpoint.prism.query.ObjectQuery)

Aggregations

CertWorkItemDtoProvider (com.evolveum.midpoint.web.page.admin.certification.dto.CertWorkItemDtoProvider)3 ObjectQuery (com.evolveum.midpoint.prism.query.ObjectQuery)1 BoxedTablePanel (com.evolveum.midpoint.web.component.data.BoxedTablePanel)1 Table (com.evolveum.midpoint.web.component.data.Table)1 CertWorkItemDto (com.evolveum.midpoint.web.page.admin.certification.dto.CertWorkItemDto)1 DataTable (org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable)1 Form (org.apache.wicket.markup.html.form.Form)1