Examples of PartialPageContext


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

    if (!(component instanceof NamingContainer))
      throw new IllegalArgumentException();

    // If PPR is off (ppc == null), or we're already rendering
    // (isInsidePartialTarget()), then we have to render, so return true
    PartialPageContext ppc = rc.getPartialPageContext();
    if ((ppc == null) || ppc.isInsidePartialTarget())
      return true;

    // And if we're a partial target ourselves, return true
    if (ppc.isPartialTarget(clientId))
      return true;

    // See if anything starts with our prefix
    String clientIdPrefix = clientId + NamingContainer.SEPARATOR_CHAR;
    Iterator<String> targets = ppc.getPartialTargets();
    while (targets.hasNext())
    {
      String target = targets.next();
      if (target == null)
        continue;
View Full Code Here

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

   */
  public static boolean isPartialRenderingPass(
    RenderingContext arc
    )
  {
    PartialPageContext pprContext = arc.getPartialPageContext();
    return (pprContext != null);
  }
View Full Code Here

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

    boolean             needsQuoting,
    Object              id,
    boolean             useScript
    ) throws IOException
  {
    PartialPageContext pContext = arc.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

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

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);

    Object savedKey = null;
    // =-=AEW Force the rowkey of a collection back to null so that the clientId
    // will be correct.  Note that in JSF 1.2, this will be unnecessary
    if (newTarget instanceof UIXCollection)
    {
      savedKey = ((UIXCollection) newTarget).getRowKey();
      if (savedKey != null)
        ((UIXCollection) newTarget).setRowKey(null);
    }

    String clientId = newTarget.getClientId(fContext);

    // Restore the row key
    if (savedKey != null)
    {
      ((UIXCollection) newTarget).setRowKey(savedKey);
    }

    _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

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

   */
  public static boolean isPartialRenderingPass(
    RenderingContext arc
    )
  {
    PartialPageContext pprContext = arc.getPartialPageContext();
    return (pprContext != null);
  }
View Full Code Here

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

  {
    // Don't bother if PPR isn't even supported
    if (!CoreRendererUtils.supportsPartialRendering(this))
      return;

    PartialPageContext partialPageContext =
      PartialPageUtils.createPartialPageContext(fContext,
                                                context);

    _pprContext = partialPageContext;
  }
View Full Code Here

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

  //
  @SuppressWarnings("unchecked")
  private void _initializePPR(
    FacesContext    fContext)
  {
    PartialPageContext pprContext =
      _adfRenderingContext.getPartialPageContext();
    if (pprContext != null)
    {
      // For compatibility with our current renderers, look for
      // the PARTIAL_TARGETS parameter, and add any that are found
      Map<String, String> parameters =
        fContext.getExternalContext().getRequestParameterMap();
      String param = parameters.get(UIConstants.PARTIAL_TARGETS_PARAM);
      if ((null != param) && !"".equals(param))
      {
        _LOG.finer("Adding partial targets from parameter: {0}", param);
        // Parse the parameter value to a String[]
        String[] partialTargets = XMLUtils.parseNameTokens(param);
        for (int i = 0; i < partialTargets.length; i++)
          pprContext.addPartialTarget(partialTargets[i]);
      }
    }
  }
View Full Code Here

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

    //VAC isPIE variable added for bug 4526850
    boolean isPIE = Agent.PLATFORM_PPC.equalsIgnoreCase(
                        arc.getAgent().getPlatformName());

    String formName = arc.getFormData().getName();
    PartialPageContext pprContext = arc.getPartialPageContext();
    // Downcast to pprContext to have access to push and pop
    // TODO: Create the span with a bogus component where
    // getClientId() returns the postscriptId;  this avoids
    // the need for push and pop calls - you just need to
    // call addPartialTarget().  Or, come up with a better
View Full Code Here

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

        renderAttribute(context, "id", iconID);

        // 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.
        PartialPageContext pprContext = context.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
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.