}
public ActionForward deleteContest(final ActionMapping mapping, final ActionForm actionForm,
final HttpServletRequest request, final HttpServletResponse response) {
final OutboundMobilityContextBean outboundMobilityContextBean = getRenderedObject();
final OutboundMobilityCandidacyContest contest = getDomainObject(request, "contestOid");
if (contest != null) {
try {
final OutboundMobilityCandidacyContestGroup mobilityGroup = contest.getOutboundMobilityCandidacyContestGroup();
if (mobilityGroup.getOutboundMobilityCandidacyContestSet().size() == 1) {
outboundMobilityContextBean.getMobilityGroups().remove(mobilityGroup);
}
contest.delete();
} catch (Exception e) {
addErrorMessage(request, "errors", e.getMessage());
}
}