Examples of UIXHierarchy


Examples of org.apache.myfaces.trinidad.component.UIXHierarchy

    RenderingContext   arc,
    TableRenderingContext tContext,
    UIComponent           table)
    throws IOException
  {
    UIXHierarchy comp = (UIXHierarchy) table;
    Object focusKey = comp.getFocusRowKey();
    final Object oldKey = comp.getRowKey();
    try
    {
      // set the collection that is being displayed:
      comp.setRowKey(focusKey);
      super.renderRangePagingControl(context, arc, tContext, table);
    }
    finally
    {
      comp.setRowKey(oldKey);
    }
  }
View Full Code Here

Examples of org.apache.myfaces.trinidad.component.UIXHierarchy

    RenderingContext   arc,
    TableRenderingContext tContext,
    UIComponent           table)
    throws IOException
  {
    UIXHierarchy comp = (UIXHierarchy) table;
    Object focusKey = comp.getFocusRowKey();
    final Object oldKey = comp.getRowKey();
    try
    {
      // set the collection that is being displayed:
      comp.setRowKey(focusKey);
      super.renderRangePagingControl(context, arc, tContext, table);
    }
    finally
    {
      comp.setRowKey(oldKey);
    }
  }
View Full Code Here

Examples of org.apache.myfaces.trinidad.component.UIXHierarchy

                                             getClientId(context, component)))
    {
      return;
    }

    UIXHierarchy tree = (UIXHierarchy) component;
    TreeUtils.expandFocusRowKey((UIXTree) component);

    Object oldPath = tree.getRowKey();
    try
    {
      boolean continueRendering = setInitialPath(tree, bean);
      if (!continueRendering)
        return;

      _renderContent(context, rc, tree, bean);
    }
    finally
    {
      tree.setRowKey(oldPath);
    }
  }
View Full Code Here

Examples of org.apache.myfaces.trinidad.component.UIXHierarchy

  {
    final String name =
      (String) node.getAttributeValue(context, UIConstants.ID_ATTR);
    assert name != null;
   
    UIXHierarchy tree = getTree(context, node);
    Object oldPath = tree.getRowKey();
    try
    {
      boolean continueRendering = setInitialPath(context, node, tree);
      if (!continueRendering)
        return;
 
      _renderContent(context, node, tree, name);
    }
    finally
    {
      tree.setRowKey(oldPath);
    }
  }
View Full Code Here

Examples of org.apache.myfaces.trinidad.component.UIXHierarchy

    BoundValue isExpandable = new BoundValue()
    {
      public Object getValue(UIXRenderingContext rc)
      {
        UINode uinode = rc.getAncestorNode(1);
        UIXHierarchy tree = (UIXHierarchy) ((UIComponentUINode) uinode).getUIComponent();
        return tree.isContainer()
          ? Boolean.TRUE
          : Boolean.FALSE;
      }
    };
View Full Code Here

Examples of org.apache.myfaces.trinidad.component.UIXHierarchy

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

Examples of org.apache.myfaces.trinidad.component.UIXHierarchy

    UIXRenderingContext context,
    UINode           node
    ) throws IOException
  {

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

    if(stamp != null)
    {

      // Save the current key
      Object oldPath = component.getRowKey();
      boolean isNewPath = setNewPath(context, node, component);
      if (isNewPath)
      {

        int size = component.getRowCount();
        int rowIndex = component.getRowIndex();
        boolean needsSeparator = false;
        boolean isSelected = false;
        boolean isFirst = false;
        boolean isLast = false;
        boolean isNextSelected = false;

        int lastIndex = size - 1;

        for (int i = size-1; i >= 0; i--)
        {
          component.setRowIndex(i);

          boolean isRendered = isRendered(context, stamp);

          if (isRendered == true)
          {
            lastIndex = i;
            break;
          }
        }

        int firstIndex = 0;
        for (int i = 0; i < size; i++)
        {
          component.setRowIndex(i);

          boolean isRendered = isRendered(context, stamp);

          if (isRendered == true)
          {
            firstIndex = i;
            break;
          }
        }


        for (int i = 0; i < size; i++)
        {
          component.setRowIndex(i);

          boolean isRendered = isRendered(context, stamp);

          if (isRendered)
          {

            if (needsSeparator)
              renderBetweenNodes(context, node);
            else
              needsSeparator = true;

            // =-=gc this doesn't account for rendered being false properly
            isSelected = i == rowIndex;
            isFirst = i==firstIndex;
            isLast = i==lastIndex;
            isNextSelected = i+1 == rowIndex;

            renderNode(context, stamp, isSelected,
                       isFirst, isLast, isNextSelected);
          }
        }

        // Restore the old path
        component.setRowKey(oldPath);
      }

      if (getVisibleIndexedChildCount(context, node) > 0)
          renderBetweenNodes(context, node);
    }
View Full Code Here

Examples of org.apache.myfaces.trinidad.component.UIXHierarchy

    UIXRenderingContext context,
    UINode           node
    ) throws IOException
  {

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

    if(stamp != null)
    {

      // Save the current key
      Object oldPath = component.getRowKey();
      boolean isNewPath = setNewPath(context, node, component);
      if (isNewPath)
      {

        int size = component.getRowCount();
        int rowIndex = component.getRowIndex();

        for (int i = 0; i < size; i++)
        {
          component.setRowIndex(i);
          boolean isRendered =
              getBooleanAttributeValue(context, stamp, RENDERED_ATTR, true);
             
          if (isRendered)
            renderNode(context, stamp,i == rowIndex);
        }

        // Restore the old path
        component.setRowKey(oldPath);
      }
    }

    super.renderContent(context, node);
  }
View Full Code Here

Examples of org.apache.myfaces.trinidad.component.UIXHierarchy

    RenderingContext      rc,
    TableRenderingContext tContext,
    UIComponent           table
    ) throws IOException
  {
    UIXHierarchy comp = (UIXHierarchy) table;
    Object focusKey = comp.getFocusRowKey();
    final Object oldKey = comp.getRowKey();
    try
    {
      // set the collection that is being displayed:
      comp.setRowKey(focusKey);
      super.renderRangePagingControl(context, rc, tContext, table);
    }
    finally
    {
      comp.setRowKey(oldKey);
    }
  }
View Full Code Here

Examples of org.apache.myfaces.trinidad.component.UIXHierarchy

    UIXRenderingContext context,
    UINode           node
    ) throws IOException
  {
    boolean initialLinkSelectedStatus = LinkUtils.isSelected(context);
    UIXHierarchy component = getHierarchyBase(context, node);
    if (component != null)
    {
      UINode stamp = getStamp(context, node);
      if(stamp != null)
      {
        // Save the current key
        Object oldPath = component.getRowKey();
        boolean isNewPath = setNewPath(context, node, component);

        if (isNewPath)
        {
          int size = component.getRowCount();
          int rowIndex = component.getRowIndex();
          boolean needsSeparator = false;

          for (int i = 0; i < size; i++)
          {

            component.setRowIndex(i);
            boolean rendered = isRendered(context, stamp);

            if (rendered)
            {

              if (needsSeparator)
                renderBetweenNodes(context, node);
              else
                needsSeparator = true;

              renderStamp(context, stamp, i==rowIndex);
            }

          }

          if (getVisibleIndexedChildCount(context, node) > 0)
            renderBetweenNodes(context, node);

          // Restore the old path
          component.setRowKey(oldPath);
        }
      }
    }

    super.renderContent(context, node);
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.