Package javax.portlet

Examples of javax.portlet.RenderResponse


    {
        PortletResponse response = getPortletResponse();
       
        if (response instanceof RenderResponse)
        {
            RenderResponse renderResponse = (RenderResponse) response;
            renderResponse.setTitle(title);
        }
    }
View Full Code Here


     * @see org.apache.velocity.tools.view.servlet.VelocityViewServlet#handleRequest(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.apache.velocity.context.Context)
     */
    protected Template handleRequest(HttpServletRequest request, HttpServletResponse response, Context ctx) throws Exception
    {
        PortletRequest renderRequest = (PortletRequest) request.getAttribute(PORTLET_REQUEST);
        RenderResponse renderResponse = (RenderResponse) request.getAttribute(PORTLET_RESPONSE);
        PortletConfig portletConfig = (PortletConfig) request.getAttribute(PORTLET_CONFIG);
       
        if (renderRequest != null)
        {
            renderRequest.setAttribute(VELOCITY_CONTEXT_ATTR, ctx);
View Full Code Here

        String content;
        try
        {
            RenderRequest request = (RenderRequest)
                pageContext.getRequest().getAttribute("javax.portlet.request");
            RenderResponse response = (RenderResponse)
                pageContext.getRequest().getAttribute("javax.portlet.response");
           
            if (request == null || response == null)
            {
                JspWriter out = pageContext.getOut();
View Full Code Here

    while(req instanceof RenderRequestWrapper)
    {
      req = ((RenderRequestWrapper)req).getRequest();
    }

    RenderResponse resp = arg1;
    while(resp instanceof RenderResponseWrapper)
    {
      resp = ((RenderResponseWrapper)resp).getResponse();
    }
    _dispatch.include(req, resp);
View Full Code Here

        return (String)request.getAttribute(StrutsPortlet.ORIGIN_URL);
    }
    private static PortletURL createPortletURL(ServletRequest request,
            String pageURL, boolean actionURL)
    {
        RenderResponse renderResponse = (RenderResponse) request
                .getAttribute("javax.portlet.response");
        PortletURL portletURL;
        if (actionURL)
            portletURL = renderResponse.createActionURL();
        else
            portletURL = renderResponse.createRenderURL();
        if (request instanceof HttpServletRequest)
        {
            String contextPath = ((HttpServletRequest) request)
                    .getContextPath();
            if (pageURL.startsWith(contextPath))
View Full Code Here

        Object response = facesContext.getExternalContext().getResponse();
        if (!(response instanceof RenderResponse))
        {
            throw new IllegalStateException("Must be a RenderResponse");
        }
        RenderResponse renderResponse = (RenderResponse) response;
        PortletURL actionURL = renderResponse.createActionURL();
        return (actionURL.toString());
    }
View Full Code Here

      hasProcessAction_ = b;
   }

   public URLBuilder getURLBuilder()
   {
      RenderResponse renderRes = (RenderResponse)response_;
      urlBuilder.setBaseURL(renderRes.createActionURL().toString());
      return urlBuilder;
   }
View Full Code Here

      String attributeName = getApplicationId() + "$PortletRequest";
      PortletRequestContext context = (PortletRequestContext)parentAppRequestContext.getAttribute(attributeName);
      PortalPrinter w = null;
      if (res instanceof RenderResponse)
      {
         RenderResponse renderRes = (RenderResponse)res;
         renderRes.setContentType("text/html; charset=UTF-8");
         w = new PortalPrinter(renderRes.getPortletOutputStream(), true, 0);
      }
      if (context != null)
      {
         context.init(w, req, res);
      }
View Full Code Here

        super(name, bindingExpression, value);
    }

    public void processRender(WebuiRequestContext context) throws Exception {

        RenderResponse resp = context.getResponse();

        //
        ResourceURL url = resp.createResourceURL();

        // context.getPortalContextPath() + "/captcha?v=" + Calendar.getInstance().getTimeInMillis()

        String random = "&v=" + Calendar.getInstance().getTimeInMillis();
View Full Code Here

        return (String)request.getAttribute(StrutsPortlet.ORIGIN_URL);
    }
    private static PortletURL createPortletURL(ServletRequest request,
            String pageURL, boolean actionURL)
    {
        RenderResponse renderResponse = (RenderResponse) request
                .getAttribute("javax.portlet.response");
        PortletURL portletURL;
        if (actionURL)
            portletURL = renderResponse.createActionURL();
        else
            portletURL = renderResponse.createRenderURL();
        if (request instanceof HttpServletRequest)
        {
            String contextPath = ((HttpServletRequest) request)
                    .getContextPath();
            if (pageURL.startsWith(contextPath))
View Full Code Here

TOP

Related Classes of javax.portlet.RenderResponse

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.