Search in sources :

Example 1 with WorkItemDtoProvider

use of com.evolveum.midpoint.web.page.admin.workflow.dto.WorkItemDtoProvider in project midpoint by Evolveum.

the class WorkItemsPanel method getSelectedWorkItems.

public List<WorkItemDto> getSelectedWorkItems() {
    DataTable table = getWorkItemTable().getDataTable();
    WorkItemDtoProvider provider = (WorkItemDtoProvider) table.getDataProvider();
    List<WorkItemDto> selected = new ArrayList<>();
    for (WorkItemDto row : provider.getAvailableData()) {
        if (row.isSelected()) {
            selected.add(row);
        }
    }
    return selected;
}
Also used : WorkItemDtoProvider(com.evolveum.midpoint.web.page.admin.workflow.dto.WorkItemDtoProvider) ArrayList(java.util.ArrayList) WorkItemDto(com.evolveum.midpoint.web.page.admin.workflow.dto.WorkItemDto)

Example 2 with WorkItemDtoProvider

use of com.evolveum.midpoint.web.page.admin.workflow.dto.WorkItemDtoProvider in project midpoint by Evolveum.

the class PageWorkItems method initLayout.

private void initLayout() {
    Form mainForm = new Form(ID_MAIN_FORM);
    add(mainForm);
    WorkItemsPanel panel = new WorkItemsPanel(ID_WORK_ITEMS_PANEL, new WorkItemDtoProvider(PageWorkItems.this, claimable, all), UserProfileStorage.TableId.PAGE_WORK_ITEMS, (int) getItemsPerPage(UserProfileStorage.TableId.PAGE_WORK_ITEMS), WorkItemsPanel.View.FULL_LIST);
    panel.setOutputMarkupId(true);
    mainForm.add(panel);
    initItemButtons(mainForm);
}
Also used : WorkItemsPanel(com.evolveum.midpoint.web.component.wf.WorkItemsPanel) Form(org.apache.wicket.markup.html.form.Form) WorkItemDtoProvider(com.evolveum.midpoint.web.page.admin.workflow.dto.WorkItemDtoProvider)

Aggregations

WorkItemDtoProvider (com.evolveum.midpoint.web.page.admin.workflow.dto.WorkItemDtoProvider)2 WorkItemsPanel (com.evolveum.midpoint.web.component.wf.WorkItemsPanel)1 WorkItemDto (com.evolveum.midpoint.web.page.admin.workflow.dto.WorkItemDto)1 ArrayList (java.util.ArrayList)1 Form (org.apache.wicket.markup.html.form.Form)1