Package org.apache.myfaces.trinidadinternal.ui

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


  {
    boolean initialLinkSelectedStatus = LinkUtils.isSelected(context);
   
    UIXNavigationLevel component = (UIXNavigationLevel) node.getUIComponent();    
    
    UINode stamp = node.getNamedChild(context, NODE_STAMP_CHILD);
   
    if(stamp != null)
    {

      // Save the current key
View Full Code Here


    Integer colSpan = _getColSpan(context, node, rowSpan);
     
    //
    // If we have a header node, render it
    //
    UINode headerNode = getNamedChild(context, node, TOP_CHILD);
    if (headerNode != null)
    {
      writer.startElement("tr", null);
      renderMargin(context, node, null);

      writer.startElement("td", null);
      writer.writeAttribute("colspan", colSpan, null);
      renderNamedChild(context, node, headerNode, TOP_CHILD);
      writer.endElement("td");

      renderMargin(context, node, null);
      writer.endElement("tr");
    }

    //
    // Begin rendering the content row
    //
    writer.startElement("tr", null);
    renderMargin(context, node, rowSpan);


    //
    // Render the left hand side
    //
    String leftName = _getSideNode(context, node, true);
    UINode leftNode = getNamedChild(context, node, leftName);
    renderLeftSideNode(context, node, leftName, leftNode, rowSpan, colSpan);
 
    //
    // Render the inner left side node, if any
    //
    String innerleftName = _getInnerSideNode(context, node, true);
    UINode innerLeftNode = getNamedChild(context, node, innerleftName);

    if (innerLeftNode != null)
    {
      renderSideNode(context, node, innerLeftNode,
                     innerleftName, rowSpan, null);
    }
 
    //
    // Render the child on the inside top of the layout
    //
    boolean isRightSideRendered =
      _renderMiddleNode(context, node, INNER_TOP_CHILD, rowSpan,
                        false, true);

       
    // render the content
    if (node.getIndexedChildCount(context) > 0)
    {
      /* if the right hand side has been rendered then we need to start a new
         row. otherwise, we can still render on to the previous row. */
      if (isRightSideRendered)
      {
        writer.startElement("tr", null);
      }
       
      writer.startElement("td", null);
      writer.writeAttribute("width", "100%", null);
      writer.writeAttribute("valign", "top", null);
       
      super.renderContent(context, node);

      writer.endElement("td");

      /* if the right hand side nodes have not been rendered, then render them
         here */
      if (!isRightSideRendered)
      {
        _renderRightNodes(context, node, rowSpan);
        isRightSideRendered = true;
      }

      writer.endElement("tr");
    }

    /* render the inner bottom child. start a new TR only if the
       right side nodes have been rendered, and render the
       right side nodes if they have not been rendered.  */
    isRightSideRendered |=
      _renderMiddleNode(context, node, INNER_BOTTOM_CHILD, rowSpan,
                        isRightSideRendered,
                        !isRightSideRendered);

    /* if a right hand side still has not been rendered then we need
       to render it here */
    if (!isRightSideRendered)
    {
      _renderRightNodes(context, node, rowSpan);
      writer.endElement("tr");
    }

    //
    // render the  footer node
    //
    UINode footerNode = getNamedChild(context, node, BOTTOM_CHILD);
    if (footerNode != null)
    {      
      writer.startElement("tr", null);
      renderMargin(context, node, null);
       
View Full Code Here

   
    //
    // Render the inner right node.
    //
    String innerSideName = _getInnerSideNode(context, node, false);
    UINode innerSideNode = getNamedChild(context, node, innerSideName);
   
    if (innerSideNode != null)
    {
      renderSideNode(context,
                      node,
                      innerSideNode,
                      innerSideName,
                      rowSpan,
                      null);

      nodeRendered = true;
    }
   
    //
    // Render the side node
    //
    String sideName = _getSideNode(context, node, false);
    UINode sideNode = getNamedChild(context, node, sideName);

    if (sideNode != null)
    {
      renderSideNode(context, node, sideNode, sideName, rowSpan, null);
      renderMargin(context, node, rowSpan);
View Full Code Here

                                    boolean startTableRow,
                                    boolean renderRightNodes)
    throws IOException
  {
    ResponseWriter writer = context.getResponseWriter();
    UINode middleNode = getNamedChild(context, node, middleNodeName);
    if (middleNode!=null)
    {
      if (startTableRow)
        writer.startElement("tr", null);
   
View Full Code Here

    if (component == null)
    {
      UIXRenderingContext parentContext = context.getParentContext();
      if (parentContext != null)
      {
        UINode parentNode = parentContext.getAncestorNode(0);
        component = NodeUtils.getUIComponent(parentContext, parentNode);
      }
    }

    return component;
View Full Code Here

  protected UIXHierarchy getHierarchyBase(
    UIXRenderingContext context,
    UINode           node
  )
  {
    UINode pageNode = context.getParentContext().getAncestorNode(0);
    return (UIXPage) pageNode.getUIComponent();
  }
View Full Code Here

  protected UINode getStamp(
    UIXRenderingContext context,
    UINode           node
    )
  {
    UINode pageNode = context.getParentContext().getAncestorNode(0);
    return getNamedChild(context, pageNode, NODE_STAMP_CHILD);
  }
View Full Code Here

                                                 node,
                                                 currChildIndex);

      if (currChildIndex != NO_CHILD_INDEX)
      {
        UINode currChildNode = node.getIndexedChild(context, currChildIndex);

        if (Boolean.TRUE.equals(
                   currChildNode.getAttributeValue(context,
                                                   UIConstants.SELECTED_ATTR)))
        {
          selectedIndex = currChildIndex;
          break;
        }
View Full Code Here

  {
    int childCount = parentNode.getIndexedChildCount(context);
    int firstEnabledChildIndex = -1;
    for (int childIndex=0; childIndex<childCount; childIndex++)
    {
      UINode childNode = parentNode.getIndexedChild(context, childIndex);
     
      if (Boolean.TRUE.equals(
            childNode.getAttributeValue(context, DISCLOSED_ATTR)))
      {
        return childIndex;
      }
      if (firstEnabledChildIndex == -&&
          !Boolean.TRUE.equals(
            childNode.getAttributeValue(context, DISABLED_ATTR)))
      {
        firstEnabledChildIndex = childIndex;
      }
    }
    return firstEnabledChildIndex;
View Full Code Here

    UINode           node
    ) throws IOException
  {

    UIXHierarchy component = getHierarchyBase(context, node);
    UINode stamp = getStamp(context, node);

    if(stamp != null)
    {

      // Save the current key
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.