Package javax.portlet.faces.Bridge

Examples of javax.portlet.faces.Bridge.PortletPhase


  @Override
  public String getRedirectURL(FacesContext facesContext, String viewId, Map<String, List<String>> parameters,
    boolean includeViewParams) {

    BridgeContext bridgeContext = BridgeContext.getCurrentInstance();
    PortletPhase portletRequestPhase = BridgeUtil.getPortletRequestPhase();

    // Determine whether or not it is necessary to work-around the patch applied to Mojarra in JAVASERVERFACES-3023
    boolean workaroundMojarra = (MOJARRA_DETECTED) &&
      ((portletRequestPhase == Bridge.PortletPhase.ACTION_PHASE) ||
        (portletRequestPhase == Bridge.PortletPhase.EVENT_PHASE));
View Full Code Here


    // NOTE: We only care about phases prior to the RENDER_PHASE because we're concerned here about managed beans
    // that get added to the request scope when the BridgeRequestScope begins. We're trying to provide those managed
    // beans with an opportunity to prepare for an unexpected invocation of their methods annotated with
    // @PreDestroy.
    ServletRequest servletRequest = servletRequestAttributeEvent.getServletRequest();
    PortletPhase phase = (PortletPhase) servletRequest.getAttribute(Bridge.PORTLET_LIFECYCLE_PHASE);

    // If this is taking place within a PortletRequest handled by the bridge in any phase prior to the
    // RENDER_PHASE, then
    if ((phase != null) && (phase != PortletPhase.RENDER_PHASE)) {
View Full Code Here

    throws MalformedURLException {

    PortletURL redirectURL = null;

    BridgeContext bridgeContext = BridgeContext.getCurrentInstance();
    PortletPhase portletRequestPhase = bridgeContext.getPortletRequestPhase();

    if ((portletRequestPhase == Bridge.PortletPhase.RENDER_PHASE) ||
        (portletRequestPhase == Bridge.PortletPhase.RESOURCE_PHASE)) {

      try {
View Full Code Here

    return redirectURL;
  }

  public PortletURL createRenderURL(String fromURL) throws MalformedURLException {
    BridgeContext bridgeContext = BridgeContext.getCurrentInstance();
    PortletPhase portletRequestPhase = bridgeContext.getPortletRequestPhase();

    if ((portletRequestPhase == Bridge.PortletPhase.RENDER_PHASE) ||
        (portletRequestPhase == Bridge.PortletPhase.RESOURCE_PHASE)) {

      try {
        logger.debug("createRenderURL fromURL=[" + fromURL + "]");

        MimeResponse mimeResponse = (MimeResponse) bridgeContext.getPortletResponse();
        PortletURL renderURL = createRenderURL(mimeResponse);
        copyRequestParameters(fromURL, renderURL);

        return renderURL;
      }
      catch (ClassCastException e) {
        throw new MalformedURLException(e.getMessage());
      }
    }
    else {
      throw new MalformedURLException("Unable to create a RenderURL during " + portletRequestPhase.toString());
    }

  }
View Full Code Here

        (beganInPhase == Bridge.PortletPhase.EVENT_PHASE) ||
        (beganInPhase == Bridge.PortletPhase.RESOURCE_PHASE));

    BridgeContext bridgeContext = BridgeContext.getCurrentInstance();

    PortletPhase portletRequestPhase = bridgeContext.getPortletRequestPhase();

    if (portletRequestPhase == Bridge.PortletPhase.RENDER_PHASE) {

      if (!portletMode.equals(bridgeContext.getPortletRequest().getPortletMode())) {
        setPortletModeChanged(true);
View Full Code Here

  protected BaseURL toBaseURL() throws MalformedURLException {

    BaseURL baseURL = null;

    // If this is executing during the ACTION_PHASE of the portlet lifecycle, then
    PortletPhase portletRequestPhase = BridgeUtil.getPortletRequestPhase();

    if (portletRequestPhase == Bridge.PortletPhase.ACTION_PHASE) {

      // The Mojarra MultiViewHandler.getResourceURL(String) method is implemented in such a way that it calls
      // ExternalContext.encodeActionURL(ExternalContext.encodeResourceURL(url)). The return value of those calls
View Full Code Here

TOP

Related Classes of javax.portlet.faces.Bridge.PortletPhase

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.