Package org.apache.myfaces.trinidad.context

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


    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

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

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

      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

  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

    boolean          needsQuoting,
    Object           id,
    boolean          useScript
    ) throws IOException
  {
    PartialPageContext pContext = context.getPartialPageContext();

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

        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

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

  {
    FacesContext fContext = __getFacesContext();

    RenderingContext afContext = RenderingContext.getCurrentInstance();

    PartialPageContext pContext = null;

    if (afContext != null)
    {
      pContext = afContext.getPartialPageContext();
    }
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.