use of com.evolveum.midpoint.web.component.data.column.LinkColumn in project midpoint by Evolveum.
the class ResourceListPanel method initColumns.
private List<IColumn> initColumns() {
List<IColumn> columns = new ArrayList<IColumn>();
IColumn column = new LinkColumn<SelectableBean<ResourceType>>(createStringResource("ObjectType.name"), "name", "value.name") {
@Override
public void onClick(AjaxRequestTarget target, IModel<SelectableBean<ResourceType>> rowModel) {
ResourceType resource = rowModel.getObject().getValue();
resourceSelectedPerformed(target, resource);
}
};
columns.add(column);
return columns;
}
use of com.evolveum.midpoint.web.component.data.column.LinkColumn in project midpoint by Evolveum.
the class ObjectSelectionPanel method initColumns.
private List<IColumn<SelectableBean<ObjectType>, String>> initColumns() {
List<IColumn<SelectableBean<ObjectType>, String>> columns = new ArrayList<>();
IColumn column = new LinkColumn<SelectableBean<ObjectType>>(createStringResource("chooseTypeDialog.column.name"), context.getSortableProperty(), "value.name") {
@Override
public void onClick(AjaxRequestTarget target, IModel<SelectableBean<ObjectType>> rowModel) {
ObjectType object = rowModel.getObject().getValue();
context.chooseOperationPerformed(target, object);
}
};
columns.add(column);
return columns;
}
use of com.evolveum.midpoint.web.component.data.column.LinkColumn in project midpoint by Evolveum.
the class WorkItemsPanel method createTargetNameColumn.
IColumn<WorkItemDto, String> createTargetNameColumn(final String headerKey) {
return new LinkColumn<WorkItemDto>(createStringResource(headerKey), WorkItemDto.F_TARGET_NAME) {
@Override
protected IModel<String> createLinkModel(IModel<WorkItemDto> rowModel) {
return Model.of(WebModelServiceUtils.resolveReferenceName(rowModel.getObject().getTargetRef(), getPageBase()));
}
@Override
public void onClick(AjaxRequestTarget target, IModel<WorkItemDto> rowModel) {
WorkItemDto dto = rowModel.getObject();
dispatchToObjectDetailsPage(dto.getTargetRef(), getPageBase(), false);
}
@Override
public void populateItem(Item<ICellPopulator<WorkItemDto>> cellItem, String componentId, final IModel<WorkItemDto> rowModel) {
super.populateItem(cellItem, componentId, rowModel);
Component c = cellItem.get(componentId);
c.add(new AttributeAppender("title", getTargetObjectDescription(rowModel)));
}
};
}
use of com.evolveum.midpoint.web.component.data.column.LinkColumn in project midpoint by Evolveum.
the class WorkItemsPanel method createObjectNameColumn.
IColumn<WorkItemDto, String> createObjectNameColumn(final String headerKey) {
return new LinkColumn<WorkItemDto>(createStringResource(headerKey), WorkItemDto.F_OBJECT_NAME) {
private static final long serialVersionUID = 1L;
@Override
protected IModel<String> createLinkModel(IModel<WorkItemDto> rowModel) {
return Model.of(WebModelServiceUtils.resolveReferenceName(rowModel.getObject().getObjectRef(), getPageBase()));
}
@Override
public void onClick(AjaxRequestTarget target, IModel<WorkItemDto> rowModel) {
WorkItemDto dto = rowModel.getObject();
dispatchToObjectDetailsPage(dto.getObjectRef(), getPageBase(), false);
}
};
}
use of com.evolveum.midpoint.web.component.data.column.LinkColumn 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 LinkColumn<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);
}
};
}
Aggregations