Search in sources :

Example 1 with GenericColumn

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

the class ProcessInstancesPanel method createNameColumn.

@NotNull
private IColumn<ProcessInstanceDto, String> createNameColumn() {
    if (WebComponentUtil.isAuthorized(AuthorizationConstants.AUTZ_UI_TASKS_ALL_URL, AuthorizationConstants.AUTZ_UI_TASK_URL)) {
        return new AjaxLinkColumn<ProcessInstanceDto>(createStringResource("MyRequestsPanel.name"), "name") {

            @Override
            protected IModel createLinkModel(IModel<ProcessInstanceDto> rowModel) {
                return createProcessNameModel(rowModel);
            }

            @Override
            public void onClick(AjaxRequestTarget target, IModel<ProcessInstanceDto> rowModel) {
                ProcessInstanceDto piDto = rowModel.getObject();
                itemDetailsPerformed(target, piDto.getTaskOid());
            }
        };
    } else {
        return new GenericColumn<>(createStringResource("MyRequestsPanel.name"), rowModel -> createProcessNameModel(rowModel));
    }
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) GenericColumn(com.evolveum.midpoint.web.component.data.column.GenericColumn) IModel(org.apache.wicket.model.IModel) AjaxLinkColumn(com.evolveum.midpoint.web.component.data.column.AjaxLinkColumn) ProcessInstanceDto(com.evolveum.midpoint.web.page.admin.workflow.dto.ProcessInstanceDto) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

AjaxLinkColumn (com.evolveum.midpoint.web.component.data.column.AjaxLinkColumn)1 GenericColumn (com.evolveum.midpoint.web.component.data.column.GenericColumn)1 ProcessInstanceDto (com.evolveum.midpoint.web.page.admin.workflow.dto.ProcessInstanceDto)1 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)1 IModel (org.apache.wicket.model.IModel)1 NotNull (org.jetbrains.annotations.NotNull)1