public ActionForward render(
      ActionMapping mapping,
      ActionForm form,
      PortletConfig portletConfig,
      RenderRequest renderRequest,
      RenderResponse renderResponse)
      throws Exception {

    try {
      ActionUtil.getNode(renderRequest);
      ActionUtil.getPage(renderRequest);
    } catch (Exception e) {
      if (e instanceof NoSuchNodeException
          || e instanceof NoSuchPageException
          || e instanceof PrincipalException) {

        SessionErrors.add(renderRequest, e.getClass().getName());

        return mapping.findForward("portlet.wiki.error");
      } else {
        throw e;
      }
    }

    return mapping.findForward(getForward(renderRequest, "portlet.wiki.edit_page_attachment"));
  }
Ejemplo n.º 2
0
  @Override
  public ActionForward render(
      ActionMapping mapping,
      ActionForm form,
      PortletConfig portletConfig,
      RenderRequest renderRequest,
      RenderResponse renderResponse)
      throws Exception {

    try {
      ActionUtil.getNode(renderRequest);
      ActionUtil.getPage(renderRequest);

      compareVersions(renderRequest, renderResponse);
    } catch (Exception e) {
      if (e instanceof NoSuchPageException) {
        SessionErrors.add(renderRequest, e.getClass());

        return mapping.findForward("portlet.wiki.error");
      } else {
        throw e;
      }
    }

    return mapping.findForward("portlet.wiki.compare_versions");
  }