Package com.liferay.faces.bridge.context

Examples of com.liferay.faces.bridge.context.RenderRedirectWriter


      // If the render-redirect standard feature is enabled in web.xml or portlet.xml, then the
      // ResponseOutputWriter has buffered up markup that must be discarded. This is because we don't want the
      // markup from the original Faces view to be included with the markup of Faces view found in the
      // redirect URL.
      if (writer instanceof RenderRedirectWriter) {
        RenderRedirectWriter responseOutputWriter = (RenderRedirectWriter) writer;
        responseOutputWriter.discard();
      }

      // Recursively call this method with the render-redirect URL so that the RENDER_RESPONSE phase of the
      // JSF lifecycle will be re-executed according to the new Faces viewId found in the redirect URL.
      execute(bridgeContext.getRenderRedirectURL());
    }

    // Otherwise,
    else {

      // In the case that a render-redirect took place, need to render the buffered markup to the response.
      if (writer instanceof RenderRedirectWriter) {
        RenderRedirectWriter responseOutputWriter = (RenderRedirectWriter) writer;
        responseOutputWriter.render();
      }
    }
  }
View Full Code Here

TOP

Related Classes of com.liferay.faces.bridge.context.RenderRedirectWriter

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.