Examples of PPRResponseWriter


Examples of org.apache.myfaces.trinidadinternal.renderkit.core.ppr.PPRResponseWriter

      ResponseWriter saved = context.getResponseWriter();
      ScriptBufferingResponseWriter scriptBufferingWriter =
        new ScriptBufferingResponseWriter(context, saved);

      boolean useXMLDom = supportsXMLDOM(arc);
      ResponseWriter pprOut = new PPRResponseWriter(scriptBufferingWriter,
                                                    pprContext,
                                                    useXMLDom);

      context.setResponseWriter(pprOut);
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.renderkit.core.ppr.PPRResponseWriter

    RenderingContext rc = RenderingContext.getCurrentInstance();
    assert (rc != null);

    boolean bufferScripts = _requestType == ReqType.LEGACY;
    PPRResponseWriter pprWriter =
      new PPRResponseWriter(origResponseWriter, rc, bufferScripts);

    _context.setResponseWriter(pprWriter);

    if (_requestType == ReqType.AJAX)
    {
      // Add render Ids as partial targets for the request from <f:ajax>
      _addRenderIdsAsPartialTargets(rc);

      // Force visit-based rendering for the <f:ajax> requests
      PartialPageUtils.forceOptimizedPPR(_context);
    }

    try
    {
      pprWriter.startDocument();

      // Note that PanelPartialRootRenderer will perform partial visit for the optimized PPR
      // if it is enabled
      _renderChildren(_context, viewRoot);

      // PDA's JavaScript DOM is not capable of updating the ViewState just by
      // using ViewState's value, so for PDAs, FormRenderer will again render
      // the ViewState as a hidden element during its postscript element rendering
      if (!CoreRenderer.isPDA(rc))
      {
        // Always write out ViewState as a separate update element.
        String state =
                _context.getApplication().getStateManager().getViewState(_context);
        pprWriter.writeViewState(state);
      }

      pprWriter.endDocument();
    }
    catch (IOException e)
    {
      // launder the IOException as a FacesException, we'll unwrap this later
      throw new FacesException(e);
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.renderkit.core.ppr.PPRResponseWriter

    RenderingContext rc = RenderingContext.getCurrentInstance();
    assert (rc != null);

    boolean bufferScripts = _requestType == ReqType.LEGACY || _requestType == ReqType.AJAX_LEGACY;
    PPRResponseWriter pprWriter =
      new PPRResponseWriter(origResponseWriter, rc, bufferScripts);

    _context.setResponseWriter(pprWriter);

    if (_requestType == ReqType.AJAX)
    {
      // Add render Ids as partial targets for the request from <f:ajax>
      _addRenderIdsAsPartialTargets(rc);

      // Force visit-based rendering for the <f:ajax> requests
      PartialPageUtils.forceOptimizedPPR(_context);
    }

    try
    {
      pprWriter.startDocument();

      // Note that PanelPartialRootRenderer will perform partial visit for the optimized PPR
      // if it is enabled
      _renderChildren(_context, viewRoot);

      // PDA's JavaScript DOM is not capable of updating the ViewState just by
      // using ViewState's value, so for PDAs, FormRenderer will again render
      // the ViewState as a hidden element during its postscript element rendering
      if (!CoreRenderer.isPDA(rc))
      {
        // Always write out ViewState as a separate update element.
        String state =
                _context.getApplication().getStateManager().getViewState(_context);
        pprWriter.writeViewState(state);
      }

      pprWriter.endDocument();
    }
    catch (IOException e)
    {
      // launder the IOException as a FacesException, we'll unwrap this later
      throw new FacesException(e);
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.renderkit.core.ppr.PPRResponseWriter

      }
      else
      {
        PartialPageContext ppc = rc.getPartialPageContext();
        if (ppc != null)
          rw = new PPRResponseWriter(rw, rc);
      }
     
      return _addDebugResponseWriters(rw);
    }
    catch (IOException ioe)
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.renderkit.core.ppr.PPRResponseWriter

      ResponseWriter saved = context.getResponseWriter();
      ScriptBufferingResponseWriter scriptBufferingWriter =
        new ScriptBufferingResponseWriter(context, saved);

      boolean useXMLDom = supportsXMLDOM(arc);
      ResponseWriter pprOut = new PPRResponseWriter(scriptBufferingWriter,
                                                    pprContext,
                                                    useXMLDom);

      context.setResponseWriter(pprOut);
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.renderkit.core.ppr.PPRResponseWriter

        _LOG.severe("No RenderingContext has been created.");
      }
      else
      {
        if (isPartialRequest(fContext.getExternalContext()))
          rw = new PPRResponseWriter(rw, rc);
      }
     
      return _addDebugResponseWriters(rw);
    }
    catch (IOException ioe)
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.renderkit.core.ppr.PPRResponseWriter

        _LOG.severe("No RenderingContext has been created.");
      }
      else
      {
        if (isPartialRequest(fContext.getExternalContext()))
          rw = new PPRResponseWriter(rw, rc);
      }
     
      return _addDebugResponseWriters(rw);
    }
    catch (IOException ioe)
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.renderkit.core.ppr.PPRResponseWriter

        _LOG.severe("No RenderingContext has been created.");
      }
      else
      {
        if (isPartialRequest(fContext.getExternalContext()))
          rw = new PPRResponseWriter(rw, rc);
      }
     
      return _addDebugResponseWriters(rw);
    }
    catch (IOException ioe)
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.renderkit.core.ppr.PPRResponseWriter

        _LOG.severe("No RenderingContext has been created.");
      }
      else
      {
        if (isPartialRequest(fContext.getExternalContext()))
          rw = new PPRResponseWriter(rw, rc);
      }
     
      return _addDebugResponseWriters(rw);
    }
    catch (IOException ioe)
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.renderkit.core.ppr.PPRResponseWriter

      }
      else
      {
        PartialPageContext ppc = rc.getPartialPageContext();
        if (ppc != null)
          rw = new PPRResponseWriter(rw, rc);
      }
     
      return _addDebugResponseWriters(rw);
    }
    catch (IOException ioe)
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.