Package javax.portlet

Examples of javax.portlet.RenderRequest


    public int doStartTag()
    {
        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();
                out.print("request response not found");
                return SKIP_BODY;
            }
            PortletApplicationModel model = (PortletApplicationModel)request.getAttribute(FrameworkConstants.MODEL_TOOL);
            if (model == null)
            {
                JspWriter out = pageContext.getOut();
                out.print("model not found");
                return SKIP_BODY;
View Full Code Here


  public void include(RenderRequest arg0, RenderResponse arg1) throws PortletException, IOException
  {
    //We need to dispatch the origional request/response objects.
    //So cut through all the wrappers and dispatch the origionals.
    //TODO: Try out some usecases.
    RenderRequest req = arg0;
    while(req instanceof RenderRequestWrapper)
    {
      req = ((RenderRequestWrapper)req).getRequest();
    }
View Full Code Here

   * @throws JspException
   * @see javax.servlet.jsp.tagext.SimpleTagSupport#doTag()
   */
  public int doEndTag() throws JspException {
    // get the ContentRenderer
    RenderRequest renderRequest = getRenderRequest();
    PortletSession session = renderRequest.getPortletSession();

    ContentRenderer renderer = (ContentRenderer) renderRequest.getAttribute(RENDERER_PARAM);
    PLinkReplacer pLinkReplacer = (PLinkReplacer) renderRequest.getAttribute(PLINK_PARAM);
    CRConfigUtil crConf = (CRConfigUtil) renderRequest.getAttribute(CRCONF_PARAM);

    try {
      if (object != null) {
        try {
          String content = renderer.renderContent(object, contentAttribute, true, pLinkReplacer, false, null);
View Full Code Here

            if (originURL != null)
                portletURL.setParameter(ORIGIN, originURL);
        }
        else
        {
            RenderRequest renderRequest = (RenderRequest)request.getAttribute("javax.portlet.request");
            portletURL.setParameter(PAGE+renderRequest.getPortletMode().toString(), pageURL.replaceAll("&","&"));
        }
        return portletURL;
    }
View Full Code Here

    public int doStartTag()
    {
        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();
                out.print("request response not found");
                return SKIP_BODY;
            }
            PortletApplicationModel model = (PortletApplicationModel)request.getAttribute(FrameworkConstants.MODEL_TOOL);
            if (model == null)
            {
                JspWriter out = pageContext.getOut();
                out.print("model not found");
                return SKIP_BODY;
View Full Code Here

     */
    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 (!TextUtils.stringSet(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

   * @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 (TextUtils.stringSet(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

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

  @SuppressWarnings("unchecked")
  private void restoreStack(ActionInvocation invocation) {
    RenderRequest request = (RenderRequest) invocation.getInvocationContext().get(REQUEST);
    if (TextUtils.stringSet(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

            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

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.