Package javax.portlet

Examples of javax.portlet.RenderRequest


     */
    public static String buildUrl(String action, String namespace, String method, Map params,
            String scheme, String type, String portletMode, String windowState,
            boolean includeContext, boolean encodeResult) {
      StringBuffer resultingAction = new StringBuffer();
        RenderRequest request = PortletActionContext.getRenderRequest();
        RenderResponse response = PortletActionContext.getRenderResponse();
        LOG.debug("Creating url. Action = " + action + ", Namespace = "
                + namespace + ", Type = " + type);
        namespace = prependNamespace(namespace, portletMode);
        if (StringUtils.isEmpty(portletMode)) {
View Full Code Here


            } catch (UnsupportedEncodingException e) {
                throw new StrutsException("Encoding "+ENCODING+" not found");
            }
        }
        RenderResponse resp = PortletActionContext.getRenderResponse();
        RenderRequest req = PortletActionContext.getRenderRequest();
        return resp.encodeURL(req.getContextPath() + sb.toString());
    }
View Full Code Here

    actionResponse.setRenderParameter(EVENT_ACTION, "true");
  }

  @SuppressWarnings("unchecked")
  private void restoreStack(ActionInvocation invocation) {
    RenderRequest request = (RenderRequest) invocation.getInvocationContext().get(REQUEST);
    if (StringUtils.isNotEmpty(request.getParameter(EVENT_ACTION))) {
      if(!isProperPrg(invocation)) {
        LOG.debug("Restoring value stack from event phase");
        ValueStack oldStack = (ValueStack) invocation.getInvocationContext().getSession().get(
        STACK_FROM_EVENT_PHASE);
        if (oldStack != null) {
View Full Code Here

   * @throws IOException
   */
  protected void executeRenderResult(final String finalLocation) throws PortletException, IOException {
    LOG.debug("Executing result in Render phase");
    PortletContext ctx = PortletActionContext.getPortletContext();
    RenderRequest req = PortletActionContext.getRenderRequest();
    RenderResponse res = PortletActionContext.getRenderResponse();
    res.setContentType(contentType);
    if (StringUtils.isNotEmpty(title)) {
      res.setTitle(title);
    }
    LOG.debug("Location: " + finalLocation);
    if (useDispatcherServlet) {
      req.setAttribute(DISPATCH_TO, finalLocation);
      PortletRequestDispatcher dispatcher = ctx.getNamedDispatcher(dispatcherServletName);
      if(dispatcher == null) {
        throw new PortletException("Could not locate dispatcher servlet \"" + dispatcherServletName + "\". Please configure it in your web.xml file");
      }
      dispatcher.include(req, res);
View Full Code Here

            log.debug("PortletContainerImpl.portletService(" + portletWindow.getId() + ") called.");
        }

        try
        {
            RenderRequest renderRequest = PortletObjectAccess.getRenderRequest(portletWindow,
                                                                               servletRequest,
                                                                               servletResponse);

            RenderResponse renderResponse = PortletObjectAccess.getRenderResponse(portletWindow,
                                                                                  servletRequest,
View Full Code Here

        PortletInvoker invoker = null;

        if (log.isDebugEnabled())
            log.debug("PortletContainerImpl.portletLoad("+portletWindow.getId()+") called.");

        RenderRequest renderRequest = PortletObjectAccess.getRenderRequest(portletWindow,
                                                                           servletRequest,
                                                                           servletResponse);

        RenderResponse renderResponse = PortletObjectAccess.getRenderResponse(portletWindow,
                                                                              servletRequest,
View Full Code Here

    }
    else
    {
      testRunner.setTestComplete(true);
      // ensure that both the public render paramter and the model are there and have the same value
      RenderRequest request = (RenderRequest) extCtx.getRequest();
      String[] prpArray = request.getPublicParameterMap().get("testPRP");
      String modelPRP = (String) extCtx.getRequestMap().get("modelPRP");
     
      if (prpArray == null)
      {
        testRunner.setTestResult(false,
View Full Code Here

  {
    testRunner.setTestComplete(true);

    FacesContext ctx = FacesContext.getCurrentInstance();
    ExternalContext extCtx = ctx.getExternalContext();
    RenderRequest request = (RenderRequest) extCtx.getRequest();

    String authType = extCtx.getAuthType();
    String requestAuthType = request.getAuthType();

    if ((authType == null && requestAuthType == null) ||
        authType.equals(requestAuthType))
    {
      testRunner.setTestResult(true,
View Full Code Here

  {
    testRunner.setTestComplete(true);

    FacesContext ctx = FacesContext.getCurrentInstance();
    ExternalContext extCtx = ctx.getExternalContext();
    RenderRequest request = (RenderRequest) extCtx.getRequest();

    String remoteUser = extCtx.getRemoteUser();
    String requestRemoteUser = request.getRemoteUser();

    if ((remoteUser == null && requestRemoteUser == null) ||
        remoteUser.equals(requestRemoteUser))
    {
      testRunner.setTestResult(true,
View Full Code Here

  {
    testRunner.setTestComplete(true);

    FacesContext ctx = FacesContext.getCurrentInstance();
    ExternalContext extCtx = ctx.getExternalContext();
    RenderRequest request = (RenderRequest) extCtx.getRequest();

    String contextPath = extCtx.getRequestContextPath();
    String requestContextPath = request.getContextPath();

    if (contextPath.equals(requestContextPath))
    {
      testRunner.setTestResult(true,
                               "extCtx.getRequestContextPath() correctly returned the same value as request.getRequestContextPath()");
View Full Code Here

TOP

Related Classes of javax.portlet.RenderRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.