Search in sources :

Example 16 with ObjectDataProvider

use of com.evolveum.midpoint.web.component.data.ObjectDataProvider in project midpoint by Evolveum.

the class ObjectSelectionPanel method updateTableByTypePerformed.

public void updateTableByTypePerformed(AjaxRequestTarget target, Class<? extends ObjectType> newType) {
    this.objectType = newType;
    TablePanel table = getTablePanel();
    DataTable dataTable = table.getDataTable();
    ObjectDataProvider provider = (ObjectDataProvider) dataTable.getDataProvider();
    provider.setType(objectType);
    target.add(this, WebComponentUtil.getPageBase(this).getFeedbackPanel(), table);
}
Also used : DataTable(org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable) ObjectDataProvider(com.evolveum.midpoint.web.component.data.ObjectDataProvider) TablePanel(com.evolveum.midpoint.web.component.data.TablePanel)

Example 17 with ObjectDataProvider

use of com.evolveum.midpoint.web.component.data.ObjectDataProvider in project midpoint by Evolveum.

the class ResourceListPanel method initLayout.

protected void initLayout() {
    TablePanel resources = new TablePanel("table", new ObjectDataProvider((PageBase) getPage(), ResourceType.class), initColumns());
    resources.setOutputMarkupId(true);
    add(resources);
}
Also used : ResourceType(com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType) ObjectDataProvider(com.evolveum.midpoint.web.component.data.ObjectDataProvider) PageBase(com.evolveum.midpoint.gui.api.page.PageBase) TablePanel(com.evolveum.midpoint.web.component.data.TablePanel)

Example 18 with ObjectDataProvider

use of com.evolveum.midpoint.web.component.data.ObjectDataProvider in project midpoint by Evolveum.

the class MultipleAssignmentSelector method applyQueryToListProvider.

private List<AssignmentEditorDto> applyQueryToListProvider(ObjectQuery query, List<AssignmentEditorDto> providerList) {
    ObjectDataProvider temporaryProvider = new ObjectDataProvider(MultipleAssignmentSelector.this, type);
    List<AssignmentEditorDto> displayAssignmentsList = new ArrayList<>();
    temporaryProvider.setQuery(query);
    Iterator it = temporaryProvider.internalIterator(0, temporaryProvider.size());
    List<SelectableBean<F>> providerDataList = IteratorUtils.toList(it);
    for (AssignmentEditorDto dto : providerList) {
        for (SelectableBean<F> providerDataDto : providerDataList) {
            F object = providerDataDto.getValue();
            if (object != null && object.getOid().equals(dto.getTargetRef().getOid())) {
                displayAssignmentsList.add(dto);
                break;
            }
        }
    }
    return displayAssignmentsList;
}
Also used : ArrayList(java.util.ArrayList) Iterator(java.util.Iterator) SelectableBean(com.evolveum.midpoint.web.component.util.SelectableBean) ObjectDataProvider(com.evolveum.midpoint.web.component.data.ObjectDataProvider)

Example 19 with ObjectDataProvider

use of com.evolveum.midpoint.web.component.data.ObjectDataProvider in project midpoint by Evolveum.

the class PageConnectorHosts method searchHostPerformed.

private void searchHostPerformed(ObjectQuery query, AjaxRequestTarget target) {
    target.add(getFeedbackPanel());
    Table panel = getConnectorHostTable();
    DataTable table = panel.getDataTable();
    ObjectDataProvider provider = (ObjectDataProvider) table.getDataProvider();
    provider.setQuery(query);
    provider.setOptions(SelectorOptions.createCollection(GetOperationOptions.createNoFetch()));
    target.add((Component) panel);
}
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) ObjectDataProvider(com.evolveum.midpoint.web.component.data.ObjectDataProvider)

Example 20 with ObjectDataProvider

use of com.evolveum.midpoint.web.component.data.ObjectDataProvider in project midpoint by Evolveum.

the class PageAccounts method listSyncDetailsPerformed.

private void listSyncDetailsPerformed(AjaxRequestTarget target) {
    refreshSyncTotalsModels();
    if (resourceModel.getObject() == null) {
        warn(getString("pageAccounts.message.resourceNotSelected"));
        refreshEverything(target);
        return;
    }
    loadResourceObjectClass();
    TablePanel table = getAccountsTable();
    ObjectDataProvider provider = (ObjectDataProvider) table.getDataTable().getDataProvider();
    provider.setQuery(createObjectQuery());
    table.getDataTable().setCurrentPage(0);
    refreshEverything(target);
}
Also used : ObjectDataProvider(com.evolveum.midpoint.web.component.data.ObjectDataProvider) TablePanel(com.evolveum.midpoint.web.component.data.TablePanel)

Aggregations

ObjectDataProvider (com.evolveum.midpoint.web.component.data.ObjectDataProvider)23 TablePanel (com.evolveum.midpoint.web.component.data.TablePanel)13 DataTable (org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable)12 Table (com.evolveum.midpoint.web.component.data.Table)5 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)5 ObjectQuery (com.evolveum.midpoint.prism.query.ObjectQuery)4 AjaxButton (com.evolveum.midpoint.web.component.AjaxButton)4 VisibleEnableBehaviour (com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour)4 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)3 PrismObject (com.evolveum.midpoint.prism.PrismObject)2 ObjectSearchDto (com.evolveum.midpoint.web.page.admin.configuration.dto.ObjectSearchDto)2 ConfigurationStorage (com.evolveum.midpoint.web.session.ConfigurationStorage)2 ReportsStorage (com.evolveum.midpoint.web.session.ReportsStorage)2 ObjectType (com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType)2 AttributeAppender (org.apache.wicket.behavior.AttributeAppender)2 IColumn (org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn)2 Form (org.apache.wicket.markup.html.form.Form)2 PageBase (com.evolveum.midpoint.gui.api.page.PageBase)1 Task (com.evolveum.midpoint.task.api.Task)1 AjaxDownloadBehaviorFromFile (com.evolveum.midpoint.web.component.AjaxDownloadBehaviorFromFile)1