Examples of PartialPageContext


Examples of org.apache.myfaces.trinidad.context.PartialPageContext

    FacesBean           bean) throws IOException
  {
    ResponseWriter writer = context.getResponseWriter();

    String formName = arc.getFormData().getName();
    PartialPageContext pprContext = arc.getPartialPageContext();

    // Write out the hidden form field that identifies which
    // form is the one being submitted
    writer.startElement("input", null);
    writer.writeAttribute("type", "hidden", null);
    writer.writeAttribute("name", CoreResponseStateManager.FORM_FIELD_NAME, null);
    writer.writeAttribute("value", formName, null);
    writer.endElement("input");

    // Check to see if this is a partial page render.  If so, we need
    // to push the ID of the postscript onto the partial target stack
    final String postscriptId = _getPostscriptId(arc, formName);
    if (pprContext != null)
    {
      if (!pprContext.isInsidePartialTarget())
      {
        pprContext.addPartialTarget(postscriptId);
      }
    }

    if (postscriptId != null)
    {
View Full Code Here

Examples of org.apache.myfaces.trinidad.context.PartialPageContext

   * <p>
   * Call this overload if you have the clientId already.
   */
  protected boolean canSkipRendering(RenderingContext rc, String clientId)
  {
    PartialPageContext ppc = rc.getPartialPageContext();
    if ((ppc == null) || ppc.isInsidePartialTarget() ||
      ppc.isPartialTarget(clientId))
      return false;

    return true;
  }
View Full Code Here

Examples of org.apache.myfaces.trinidad.context.PartialPageContext

   * Call this overload if you don't have the clientId already.
   */
  protected boolean canSkipRendering(FacesContext context,
    RenderingContext rc, UIComponent component)
  {
    PartialPageContext ppc = rc.getPartialPageContext();
    if ((ppc == null) || ppc.isInsidePartialTarget())
      return false;

    String clientId = component.getClientId(context);
    if (ppc.isPartialTarget(clientId))
      return false;

    return true;
  }
View Full Code Here

Examples of org.apache.myfaces.trinidad.context.PartialPageContext

  private void _renderTransparent(FacesContext context,
    RenderingContext rc, String width, String height, boolean needsQuoting,
    Object id, boolean useScript)
    throws IOException
  {
    PartialPageContext pContext = rc.getPartialPageContext();

    // cannot use t() in MarlinCore.js on a partial rendering pass
    // just render the icon.
    if (!useScript || (pContext != null))
    {
View Full Code Here

Examples of org.apache.myfaces.trinidad.context.PartialPageContext

    // Check to see if this is a partial page render.  If so, we need
    // to push the ID of the postscript onto the partial target stack
    final String postscriptId = _getPostscriptId(rc, formName);

    PartialPageContext pprContext = rc.getPartialPageContext();

    if (pprContext != null)
    {
      if (!pprContext.isInsidePartialTarget())
      {
        pprContext.addPartialTarget(postscriptId);

        // if optimized PPR is enabled, we will never call encodeall at this point, so we need
        // no force the postscript element to render now
        if (PartialPageUtils.isOptimizedPPREnabled(context, false))
        {
View Full Code Here

Examples of org.apache.myfaces.trinidad.context.PartialPageContext

  {
    String noJavaScriptSupport = "false";
    ResponseWriter writer = context.getResponseWriter();

    String formName = rc.getFormData().getName();
    PartialPageContext pprContext = rc.getPartialPageContext();

    // Write out the hidden form field that identifies which
    // form is the one being submitted
    writer.startElement("input", null);
    writer.writeAttribute("type", "hidden", null);
View Full Code Here

Examples of org.apache.myfaces.trinidad.context.PartialPageContext

  public PPRResponseWriter(ResponseWriter     out,
                           RenderingContext   rc,
                           boolean            bufferScripts)
  {
    super(out, bufferScripts);
    PartialPageContext pprContext = rc.getPartialPageContext();
    if (!(pprContext instanceof PartialPageContextImpl))
        throw new IllegalArgumentException();

    _state = new State((PartialPageContextImpl) pprContext);
    _xml        = new XmlResponseWriter(out, out.getCharacterEncoding());
View Full Code Here

Examples of org.apache.myfaces.trinidad.context.PartialPageContext

      encodeAllChildren(context, component);
    }
    else
    {
      // perform an optimized partial visit of the children
      PartialPageContext pprContext = rc.getPartialPageContext();

      VisitContext visitContext = pprContext.getVisitContext();

      try
      {
        for (UIComponent currChild : component.getChildren())
        {
View Full Code Here

Examples of org.apache.myfaces.trinidad.context.PartialPageContext

      {
        // launder the IOException as a FacesException, we'll unwrap this later
        throw new FacesException(ioe);
      }

      PartialPageContext pprContext = RenderingContext.getCurrentInstance().getPartialPageContext();

      // if we finished rendering all of the destired targets, return that we are
      // done.  Otherwise, reject this subtree so that we don't traverse into it, since
      // we have already rendered all of the targets in it
      if (pprContext.areAllTargetsProcessed())
        return VisitResult.COMPLETE;
      else
        return VisitResult.REJECT;
    }
View Full Code Here

Examples of org.apache.myfaces.trinidad.context.PartialPageContext

  {
    FacesContext fContext = __getFacesContext();

    RenderingContext afContext = RenderingContext.getCurrentInstance();

    PartialPageContext pContext = null;

    if (afContext != null)
      pContext = afContext.getPartialPageContext();

    // find the nearest ancestor that generates html markup:
    newTarget = _getNearestPPRTarget(newTarget);
    String clientId = newTarget.getClientId(fContext);

    _LOG.finer("Adding partial target: {0}", newTarget);

    if (pContext != null)
    {
      pContext.addPartialTarget(clientId);
    }
    else
    {
      // If we haven't built the partial context yet, maintain a list of the
      // target IDs that have requested partial update.
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.