Skip to content

Commit

Permalink
Fixed assignment information icon tooltip.
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Jun 8, 2015
1 parent ca3c922 commit 4549aec
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
Expand Up @@ -31,6 +31,7 @@
import com.evolveum.midpoint.web.util.ObjectTypeGuiDescriptor;
import com.evolveum.midpoint.web.util.OnePageParameterEncoder;
import com.evolveum.midpoint.web.util.TooltipBehavior;
import com.evolveum.midpoint.xml.ns._public.common.common_3.AccessCertificationCampaignType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.AccessCertificationCaseType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.OrgType;
Expand Down Expand Up @@ -151,7 +152,14 @@ public String getObject() {
@Override
public void populateItem(Item<ICellPopulator<CertCaseOrDecisionDto>> item, String componentId, IModel<CertCaseOrDecisionDto> rowModel) {
super.populateItem(item, componentId, rowModel);
CertGuiHandler handler = CertGuiHandlerRegistry.instance().getHandler(rowModel.getObject().getHandlerUri());
CertCaseOrDecisionDto aCase = rowModel.getObject();
String handlerUri;
if (aCase instanceof CertDecisionDto) {
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));
Expand Down
Expand Up @@ -556,4 +556,8 @@ private String getCampaignOid() {
StringValue campaignOid = getPageParameters().get(OnePageParameterEncoder.PARAMETER);
return campaignOid != null ? campaignOid.toString() : null;
}

public String getCampaignHandlerUri() {
return campaignModel.getObject().getHandlerUri();
}
}
Expand Up @@ -145,4 +145,7 @@ public int getCurrentStageNumber() {
return campaign.getCurrentStageNumber();
}

public String getHandlerUri() {
return campaign.getHandlerUri();
}
}

0 comments on commit 4549aec

Please sign in to comment.