Package org.apache.myfaces.trinidadinternal.ui

Examples of org.apache.myfaces.trinidadinternal.ui.UINode


    // Walk the indexed children
    int count = ancestor.getIndexedChildCount(context);
    for(int i = 0; i < count; i++)
    {
      UINode currChild = ancestor.getIndexedChild(context, i);

      if (!renderedOnly || !BaseRenderer.skipNode(childContext, currChild))
      {
        if (path != null)
          path.add(i);

        // Walk the node, then its children
        value = walker.walkNode(childContext, currChild, value, path);
        if (walker.walkChildren(childContext, currChild, value, path))
        {
          value = _walkTree(childContext, currChild, walker, value, path,
                            renderedOnly);
        }

        if (path != null)
          path.removeLastElement();
      }
    }

    // Walk the named children
    Iterator<String> e;

    // For switcher beans, only walk the "CHILD_NAME_ATTR" bean; a
    // SingleItemIterator does the trick quite well...
    if (renderedOnly && _isSwitcherBean(ancestor))
    {
      Object name = ancestor.getAttributeValue(context,
                                               UIConstants.CHILD_NAME_ATTR);
      if (name == null)
        e = null;
      else
        e = Collections.singletonList((String)name).iterator();
    }
    else
    {
      e = ancestor.getChildNames(context);
    }

    if (e != null)
    {
      while (e.hasNext())
      {
        String next = e.next();

        UINode currNamedChild =
                    ancestor.getNamedChild(context, next);
        if ((currNamedChild != null) &&
            (!renderedOnly || !BaseRenderer.skipNode(childContext, currNamedChild)))
        {
          if (path != null)
View Full Code Here


  static private UINode _getStructuralAncestor(
   UIXRenderingContext context,
   int              depth)
  {
    UINode ancestor;

    do
    {
      ancestor = context.getRenderedAncestorNode(depth);
      if (ancestor == null)
        break;

      if (isStructuralButNotComposite(ancestor.getNodeRole(context)))
        break;

      depth++;
    }
    while (true);
View Full Code Here

  {
    UIXRenderingContext parentContext = context.getParentContext();

    if (parentContext != null)
    {
      UINode baseNode = parentContext.getAncestorNode(0);

      if (baseNode != null)
      {
        return baseNode.getAttributeValue(parentContext, _attrKey);
      }
    }

    return null;
  }
View Full Code Here

    int              childIndex
    )
  {
    if (childIndex == 0)
    {
      UINode poppedNode = getPoppedNode(context);

      if (poppedNode != null)
      {
        return poppedNode;
      }
View Full Code Here

    context = context.getParentContext();
    if (context == null)
      return null;

    UINode rootNode = context.getAncestorNode(0);

    if (_childName != null)
    {
      return rootNode.getNamedChild(context, _childName);
    }
    else
    {
      return rootNode.getIndexedChild(context, _childIndex);
    }
  }
View Full Code Here

    boolean          returnBoundValue
    )
  {
    if (attrKey == UIConstants.RENDERED_ATTR)
    {
      UINode poppedNode = getPoppedNode(context);

      if (poppedNode != null)
      {
        // ask the popped node for the rendered attribute in its context
        return poppedNode.getAttributeValue(context.getParentContext(),
                                            attrKey);
      }
      else
      {
        return Boolean.FALSE;
View Full Code Here

                              (ContextPoppingUINode)context.getAncestorNode(0);
      DataObject poppingCurrentDataObject  = context.getCurrentDataObject();

      UIXRenderingContext poppedContext = context.getParentContext();

      UINode poppedNode = poppingNode.getPoppedNode(context);

      // push on the child's path information
      poppedContext.pushChild(poppedNode,
                              poppingNode.__getChildName(),
                              poppingNode.__getChildIndex());
      poppedContext.pushRenderedChild(poppedContext, poppedNode);

      DataObject poppedCurrentDataObject =
        poppedContext.setCurrentDataObject(poppingCurrentDataObject);

      try
      {
        poppedNode.render(poppedContext);
      }
      finally
      {
        poppedContext.setCurrentDataObject(poppedCurrentDataObject);
        poppedContext.popRenderedChild(poppedContext);
View Full Code Here

    throws IOException
  {
    if (!getRendersChildren())
    {
      UIXRenderingContext rContext = getRenderingContext(context, component);
      UINode node = createUINode(context, component);
      Renderer renderer = _getRenderer(rContext, node);
      assert(renderer instanceof PreAndPostRenderer);
      ((PreAndPostRenderer) renderer).prerender(rContext, node);
    }
  }
View Full Code Here

      createUINode(context, component).render(rContext);
    }
    else
    {
      // =-=AEW Should be able to retrieve cached UINode!
      UINode node = createUINode(context, component);
      Renderer renderer = _getRenderer(rContext, node);
      assert(renderer instanceof PreAndPostRenderer);
      ((PreAndPostRenderer) renderer).postrender(rContext, node);
    }
  }
View Full Code Here

  {
    UIXRenderingContext parentContext = context.getParentContext();

    if (parentContext != null)
    {
      UINode baseNode = parentContext.getAncestorNode(0);

      if (baseNode != null)
      {
        if (_childName != null)
        {
          return baseNode.getNamedChild(parentContext, _childName);
        }
        else
        {
          return baseNode.getIndexedChild(parentContext, _childIndex);
        }
      }
    }

    return null;
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidadinternal.ui.UINode

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.