Examples of PortletURL


Examples of javax.portlet.PortletURL

     * @return
     */   
    public PortletURL getLink(String forward, String action)
    {
        String actionForward = model.getForward(forward, action);
        PortletURL url = response.createRenderURL();
        buildLink(actionForward, url);
        return url;
    }
View Full Code Here

Examples of javax.portlet.PortletURL

        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

Examples of javax.portlet.PortletURL

         
          //PostProcess:
          //  replace all relative links with actions
         
          //Any HREFs and Form actions should be extended with the ActionURL
          PortletURL actionURL = response.createActionURL();
         
          // Get the buffered page from the PHP servlet
          StringBuffer page = phpServletImpl.getSourcePage();
         
          // Call into the PostProcess object which is the same for PERL and other script engine
View Full Code Here

Examples of javax.portlet.PortletURL

        */
       
       
       
        // Post Process for generated page   
        PortletURL actionURL = response.createActionURL();
        ScriptPostProcess processor = new ScriptPostProcess();
        processor.setInitalPage(page);
        processor.postProcessPage(actionURL, PerlParameters.ACTION_PARAMETER_PERL);
        String finalPage = processor.getFinalizedPage();
       
View Full Code Here

Examples of javax.portlet.PortletURL

      // the viewId into
      // the response
      // (interaction
      // state)
      RenderResponse renderResponse = (RenderResponse) getResponse();
      PortletURL actionURL = renderResponse.createActionURL();

      // Add parameters so they don't get lost
      Enumeration<String> list = queryStr.getParameterNames();
      while (list.hasMoreElements())
      {
        String param = list.nextElement().toString();
        if (param.equals(Bridge.PORTLET_MODE_PARAMETER))
        {
          try
          {
            actionURL.setPortletMode(new PortletMode(queryStr.getParameter(param)));
          }
          catch (Exception e)
          {
            ; // do nothing -- just ignore
          }
        }
        else if (param.equals(Bridge.PORTLET_WINDOWSTATE_PARAMETER))
        {
          try
          {
            actionURL.setWindowState(new WindowState(queryStr.getParameter(param)));
          }
          catch (Exception e)
          {
            ; // do nothing -- just ignore
          }
        }
        else if (param.equals(Bridge.PORTLET_SECURE_PARAMETER))
        {
          try
          {
            actionURL.setSecure(Boolean.getBoolean(queryStr.getParameter(param)));
          }
          catch (Exception e)
          {
            ; // do nothing -- just ignore
          }
        }
        else
        {
          actionURL.setParameter(param, queryStr.getParameter(param));
        }
      }

      // TODO hack to workaround double encoding problem
      url = actionURL.toString();
      url = url.replaceAll("\\&amp\\;", "&");
    }
    else
    { // action - write the viewId to navigational state
      ActionResponse actionResponse = (ActionResponse) getResponse();
View Full Code Here

Examples of javax.portlet.PortletURL

          resultingAction.append("!").append(method);
        }
        LOG.debug("Resulting actionPath: " + resultingAction);
        params.put(PortletActionConstants.ACTION_PARAM, new String[] { resultingAction.toString() });

        PortletURL url = null;
        if ("action".equalsIgnoreCase(type)) {
            LOG.debug("Creating action url");
            url = response.createActionURL();
        } else {
            LOG.debug("Creating render url");
            url = response.createRenderURL();
        }

        params.put(PortletActionConstants.MODE_PARAM, portletMode);
        url.setParameters(ensureParamsAreStringArrays(params));

        if ("HTTPS".equalsIgnoreCase(scheme)) {
            try {
                url.setSecure(true);
            } catch (PortletSecurityException e) {
                LOG.error("Cannot set scheme to https", e);
            }
        }
        try {
            url.setPortletMode(getPortletMode(request, portletMode));
            url.setWindowState(getWindowState(request, windowState));
        } catch (Exception e) {
            LOG.error("Unable to set mode or state:" + e.getMessage(), e);
        }
        result = url.toString();
        // TEMP BUG-WORKAROUND FOR DOUBLE ESCAPING OF AMPERSAND
        if(result.indexOf("&amp;") >= 0) {
            result = result.replace("&amp;", "&");
        }
        return result;
View Full Code Here

Examples of javax.portlet.PortletURL

        if (urlTag == null) {
            throw new JspException(
                "the 'param' Tag must have actionURL or renderURL as a parent");
        }

        PortletURL url = urlTag.getUrl();

        if (getName() != null) {
            url.setParameter(getName(), getValue());
        }

        return SKIP_BODY;
    }
View Full Code Here

Examples of javax.portlet.PortletURL

  /**
   * @return The action url.
   */
  public static String setViewIdForUrl(FacesContext facesContext, String viewId) {
    RenderResponse response = (RenderResponse) facesContext.getExternalContext().getResponse();
    PortletURL url = response.createActionURL();
    url.setParameter(VIEW_ID, viewId);
    return url.toString();
  }
View Full Code Here

Examples of javax.portlet.PortletURL

        return currentContentType;
    }

    public PortletURL createRenderURL()
    {
        PortletURL url = createURL(false);
        return url;
    }
View Full Code Here

Examples of javax.portlet.PortletURL

        return url;
    }

    public PortletURL createActionURL()
    {
        PortletURL url = createURL(true);
        return url;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.