@Override
  public void handleEvent(
      final UICockpitPerspective perspective, final Map<String, String[]> params) {
    final String itemParam = this.getParameter(params, COMPETITION_KEY);

    CompetitionModel competition = null;
    try {
      final TypedObject item =
          UISessionUtils.getCurrentSession().getTypeService().wrapItem(PK.parse(itemParam));
      if (item != null) {
        competition = (CompetitionModel) item.getObject();
      }
    } catch (final Exception e) {
      LOG.warn("competition specified in jumpin URL not forund: " + itemParam, e);
    }

    if (competition != null) {
      getFrontendController().changeCompetition(competition.getCode());
    }
  }
示例#2
0
 @Override
 public String toString() {
   return competition.getCode();
 }