Package org.apache.myfaces.trinidad.context

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


  }

  private void _addRenderIdsAsPartialTargets(RenderingContext rc)
  {
    Collection<String> renderIds = getRenderIds();
    PartialPageContext pc = rc.getPartialPageContext();
    for (String id: renderIds)
    {
      pc.addPartialTarget(id);
    }
  }
View Full Code Here


    // 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

            // If the navigation bar that we are currently rendering
            // is included in a partial page response, add the icon
            // id to the list of partial targets.
            // =-=AEW Not sure this is still necessary
            PartialPageContext pprContext = rc.getPartialPageContext();
            if ((pprContext != null) &&
                pprContext.isInsidePartialTarget())
            {
              pprContext.addRenderedPartialTarget(iconID);
            }
          }
          else
          {
            // not in PPR mode, so just render the td (and id if not in a table)
View Full Code Here

      // =-=AEW How to pick a proper ID?

      // Write out a script;  let PPR know to use it
      String scriptId = "::launchScript";
      PartialPageContext ppContext = arc.getPartialPageContext();
      // TODO: Create the span with a bogus component where
      // getClientId() returns the scriptId;  this avoids
      // the need to downcast - you just need to
      // call addPartialTarget().  Or, come up with a better
      // PPR api to make it simpler
View Full Code Here

  //
  // Also note that this method is overridden for the MarlinCore
  // library.  See XhtmlScriptletFactory.
  boolean __isOutsidePartialPage(RenderingContext arc)
  {
    PartialPageContext pprContext = arc.getPartialPageContext();
    if (pprContext == null)
      return false;

    return !pprContext.isInsidePartialTarget();
  }
View Full Code Here

   * <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

   * 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

  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

      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

      {
        // 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

TOP

Related Classes of org.apache.myfaces.trinidad.context.PartialPageContext

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.