Ejemplo n.º 1
0
  @Override
  public void render(RenderRequest renderRequest, RenderResponse renderResponse)
      throws IOException, PortletException {

    try {
      HttpServletRequest httpServletRequest = PortalUtil.getHttpServletRequest(renderRequest);

      httpServletRequest = PortalUtil.getOriginalServletRequest(httpServletRequest);

      String oAuthVerifier = httpServletRequest.getParameter(OAuthConstants.VERIFIER);

      if (oAuthVerifier != null) {
        updateAccessToken(renderRequest, oAuthVerifier);
      }

      String remoteMVCPath = renderRequest.getParameter("remoteMVCPath");

      if (remoteMVCPath != null) {
        remoteRender(renderRequest, renderResponse);

        return;
      }
    } catch (IOException ioe) {
      throw ioe;
    } catch (Exception e) {
      throw new PortletException(e);
    }

    super.render(renderRequest, renderResponse);
  }
  @Override
  public void render(RenderRequest renderRequest, RenderResponse renderResponse)
      throws IOException, PortletException {

    renderRequest.setAttribute(JournalWebKeys.JOURNAL_CONTENT, _journalContent);

    super.render(renderRequest, renderResponse);
  }
  @Override
  public void render(RenderRequest renderRequest, RenderResponse renderResponse)
      throws IOException, PortletException {

    _portletRequestThreadLocal.set(renderRequest);

    renderRequest.setAttribute(JavaConstants.JAVAX_PORTLET_CONFIG, getPortletConfig());

    super.render(renderRequest, renderResponse);
  }
  @Override
  public void render(RenderRequest renderRequest, RenderResponse renderResponse)
      throws IOException, PortletException {

    String path = getPath(renderRequest);

    if (Validator.equals(path, "/edit_article.jsp")) {
      renderRequest.setAttribute(JournalWebKeys.ITEM_SELECTOR, _itemSelector);
    }

    super.render(renderRequest, renderResponse);
  }
  @Override
  public void render(RenderRequest renderRequest, RenderResponse renderResponse)
      throws IOException, PortletException {

    ItemSelectorRendering itemSelectorRendering =
        _itemSelector.getItemSelectorRendering(renderRequest, renderResponse);

    LocalizedItemSelectorRendering localizedItemSelectorRendering =
        new LocalizedItemSelectorRendering(renderRequest.getLocale(), itemSelectorRendering);

    localizedItemSelectorRendering.store(renderRequest);

    super.render(renderRequest, renderResponse);
  }
Ejemplo n.º 6
0
  @Override
  public void render(RenderRequest renderRequest, RenderResponse renderResponse)
      throws IOException, PortletException {

    String mvcPath = ParamUtil.getString(renderRequest, "mvcPath");

    if (mvcPath.equals("/edit_entry.jsp")) {
      JSONArray serviceClassNamesToContextNamesJSONArray =
          getServiceClassNamesToContextNamesJSONArray();

      renderRequest.setAttribute(
          SAPWebKeys.SERVICE_CLASS_NAMES_TO_CONTEXT_NAMES,
          serviceClassNamesToContextNamesJSONArray);
    }

    super.render(renderRequest, renderResponse);
  }
  @Override
  public void render(RenderRequest request, RenderResponse response)
      throws IOException, PortletException {

    try {
      setWorkflowTaskRenderRequestAttribute(request);
    } catch (Exception e) {
      if (isSessionErrorException(e)) {
        hideDefaultErrorMessage(request);

        SessionErrors.add(request, e.getClass());
      } else {
        throw new PortletException(e);
      }
    }

    super.render(request, response);
  }