Examples of PartialPageContext


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

  {
    String noJavaScriptSupport = "false";
    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");
   
    // set the hidden parameter noJavaScriptSupport as true for Non-JavaScript
    // browsers
    if( !supportsScripting(arc))
    {
      noJavaScriptSupport = XhtmlConstants.NON_JS_BROWSER_TRUE;
    }
    writer.startElement("input", null);
    writer.writeAttribute("type", "hidden", null);
    writer.writeAttribute("name", XhtmlConstants.NON_JS_BROWSER,null );
    writer.writeAttribute("value", noJavaScriptSupport, 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

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

  {
    FacesContext fContext = __getFacesContext();

    RenderingContext afContext = RenderingContext.getCurrentInstance();

    PartialPageContext pContext = null;

    if (afContext != null)
    {
      pContext = afContext.getPartialPageContext();
    }
View Full Code Here

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

      rowKeyManager = ((UIXCollection) component).getClientRowKeyManager();

    Set<Object> rowKeys = null;
    String tablePrefix = clientId + NamingContainer.SEPARATOR_CHAR;
    // Search for any PPR targets that start with "<tableClientId>:"
    PartialPageContext ppc = rc.getPartialPageContext();
    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

    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

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

  }

  private void _addRenderIdsAsPartialTargets(RenderingContext rc)
  {
    Collection<String> renderIds = getRenderIds();
    PartialPageContext pc = rc.getPartialPageContext();
    for (String id: renderIds)
    {
      pc.addPartialTarget(id);
    }
  }
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

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