use of com.evolveum.midpoint.web.component.data.column.AjaxLinkColumn 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));
}
}
use of com.evolveum.midpoint.web.component.data.column.AjaxLinkColumn in project midpoint by Evolveum.
the class ProcessInstancesPanel method createObjectNameColumn.
// copied and adapted from WorkItemsPanel - TODO deduplicate
IColumn<ProcessInstanceDto, String> createObjectNameColumn(final String headerKey) {
return new AjaxLinkColumn<ProcessInstanceDto>(createStringResource(headerKey), ProcessInstanceDto.F_OBJECT_NAME) {
@Override
public void onClick(AjaxRequestTarget target, IModel<ProcessInstanceDto> rowModel) {
ProcessInstanceDto dto = rowModel.getObject();
dispatchToObjectDetailsPage(dto.getObjectRef(), getPageBase(), false);
}
};
}
use of com.evolveum.midpoint.web.component.data.column.AjaxLinkColumn in project midpoint by Evolveum.
the class ProcessInstancesPanel method createTargetNameColumn.
IColumn<ProcessInstanceDto, String> createTargetNameColumn(final String headerKey) {
return new AjaxLinkColumn<ProcessInstanceDto>(createStringResource(headerKey), ProcessInstanceDto.F_TARGET_NAME) {
@Override
public void onClick(AjaxRequestTarget target, IModel<ProcessInstanceDto> rowModel) {
ProcessInstanceDto dto = rowModel.getObject();
dispatchToObjectDetailsPage(dto.getTargetRef(), getPageBase(), false);
}
};
}
Aggregations