Package com.liferay.faces.util.jsp

Examples of com.liferay.faces.util.jsp.PageContextAdapter


      HttpServletRequest httpServletRequest = PortalUtil.getHttpServletRequest(portletRequest);
      PortletResponse portletResponse = (PortletResponse) externalContext.getResponse();
      HttpServletResponse httpServletResponse = PortalUtil.getHttpServletResponse(portletResponse);
      ELContext elContext = liferayFacesContext.getELContext();
      StringJspWriter stringJspWriter = new StringJspWriter();
      PageContextAdapter pageContextAdapter = new PageContextAdapter(httpServletRequest, httpServletResponse,
          elContext, stringJspWriter);

      // Invoke the Liferay Tag class directly (rather than using the tag from a JSP).
      PermissionsURLTag permissionsURLTag = new PermissionsURLTag();
View Full Code Here


      HttpServletRequest httpServletRequest = PortalUtil.getHttpServletRequest(portletRequest);
      PortletResponse portletResponse = (PortletResponse) externalContext.getResponse();
      HttpServletResponse httpServletResponse = PortalUtil.getHttpServletResponse(portletResponse);
      ELContext elContext = liferayFacesContext.getELContext();
      StringJspWriter stringJspWriter = new StringJspWriter();
      PageContextAdapter pageContextAdapter = new PageContextAdapter(httpServletRequest, httpServletResponse,
          elContext, stringJspWriter);

      // Invoke the Liferay Tag class directly (rather than using the tag from a JSP).
      PermissionsURLTag permissionsURLTag = new PermissionsURLTag();
View Full Code Here

        // Invoke the Liferay HtmlTopTag class directly (rather than using liferay-util:html-top from a JSP).
        StringJspWriter stringJspWriter = new StringJspWriter();
        BodyContent bodyContent = new StringBodyContent(stringJspWriter);
        String elementAsString = element.toString();
        HtmlTopTag htmlTopTag = new HtmlTopTag();
        PageContextAdapter pageContextAdapter = new PageContextAdapter(httpServletRequest, httpServletResponse,
            elContext, stringJspWriter);
        htmlTopTag.setPageContext(pageContextAdapter);
        htmlTopTag.doStartTag();
        bodyContent.print(elementAsString);
        htmlTopTag.setBodyContent(bodyContent);
View Full Code Here

    HttpServletRequest httpServletRequest = getHttpServletRequest(portletRequest);
    PortletResponse portletResponse = (PortletResponse) externalContext.getResponse();
    HttpServletResponse httpServletResponse = getHttpServletResponse(portletResponse);
    ELContext elContext = facesContext.getELContext();
    StringJspWriter stringJspWriter = new StringJspWriter();
    PageContextAdapter pageContextAdapter = new PageContextAdapter(httpServletRequest, httpServletResponse,
        elContext, stringJspWriter);

    // Invoke the JSP tag lifecycle directly (rather than using the tag from a JSP).
    tag.setPageContext(pageContextAdapter);
    tag.doStartTag();
    tag.doEndTag();

    // If executing within an Ajax request, then write all the scripts contained in the AUI_SCRIPT_DATA attribute
    // directly to the tag output.
    PartialViewContext partialViewContext = facesContext.getPartialViewContext();

    if (partialViewContext.isAjaxRequest()) {

      //J-
      // TODO: Possibly need to be concerned about inline scripts written in the <head>...</head> section during Ajax.
      //
      // StringBundler data = HtmlTopTag.getData(httpServletRequest, WebKeys.PAGE_TOP);
      //J+

      Object scriptData = httpServletRequest.getAttribute(WebKeys.AUI_SCRIPT_DATA);

      if (scriptData != null) {
        JspWriter jspWriter = pageContextAdapter.getOut();

        try {
          jspWriter.write(portalTagOutputParser.getScriptSectionMarker());
          ScriptTagUtil.flushScriptData(pageContextAdapter);
        }
View Full Code Here

TOP

Related Classes of com.liferay.faces.util.jsp.PageContextAdapter

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.