use of com.evolveum.midpoint.web.page.admin.certification.handlers.CertGuiHandler in project midpoint by Evolveum.
the class CertDecisionHelper method createDetailedInfoColumn.
<T extends CertCaseOrWorkItemDto> IColumn<T, String> createDetailedInfoColumn(final PageBase page) {
IColumn column;
column = new IconColumn<CertCaseOrWorkItemDto>(page.createStringResource("")) {
@Override
protected IModel<String> createIconModel(final IModel<CertCaseOrWorkItemDto> rowModel) {
return new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
return "fa fa-fw fa-info-circle text-info";
}
};
}
@Override
public void populateItem(Item<ICellPopulator<CertCaseOrWorkItemDto>> item, String componentId, IModel<CertCaseOrWorkItemDto> rowModel) {
super.populateItem(item, componentId, rowModel);
CertCaseOrWorkItemDto aCase = rowModel.getObject();
String handlerUri;
if (aCase instanceof CertWorkItemDto) {
handlerUri = aCase.getHandlerUri();
} else {
handlerUri = ((PageCertCampaign) page).getCampaignHandlerUri();
}
CertGuiHandler handler = CertGuiHandlerRegistry.instance().getHandler(handlerUri);
if (handler != null) {
String title = handler.getCaseInfoButtonTitle(rowModel, page);
item.add(AttributeModifier.replace("title", title));
item.add(new TooltipBehavior());
}
}
};
return column;
}
Aggregations