Examples of UIXHierarchy


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

    FacesContext     context,
    RenderingContext rc,   
    UIComponent      component,
    FacesBean        bean) throws IOException
  {
    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

    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

      UINode           node
      ) throws IOException
  {
    boolean initialLinkSelectedStatus = LinkUtils.isSelected(context);

    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);
          renderStamp(context, stamp,i == rowIndex);

          if ( i < (size - 1))
            renderBetweenIndexedChildren(context,node,i);

        }

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

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

    super.renderContent(context, node);
    //Reset the selected status, which might have been changed on rendering
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();
        for (int i = 0; i < size; i++)
        {
          component.setRowIndex(i);
          renderChild(context, stamp);

        }

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

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

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

      UINode           node
      ) throws IOException
    {
      boolean initialLinkSelectedStatus = LinkUtils.isSelected(context);

      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);
            renderStamp(context, stamp,i == rowIndex);

            if ( i < (size - 1))
              renderBetweenIndexedChildren(context,node);

          }

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

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

      super.renderContent(context, node);
      //Reset the selected status, which might have been changed on rendering
View Full Code Here

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

    UINode           node
    ) throws IOException
  {
    super.prerender(context, node);

    UIXHierarchy component = getHierarchyBase(context, node);
    int childCount = _getItemCount(context, node, component);

    // no kids, no breadcrumbs -- but you still get the span.
    int minChildCount = 0;
    if ( !renderLastChild(context, node))
View Full Code Here

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

  protected void renderContent(
    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();
      Object focusPath = getFocusPath(component);
      if (focusPath == null)
        return;
     
      List<Object> paths =
        new ArrayList<Object>(component.getAllAncestorContainerRowKeys(focusPath));
      paths.add(focusPath);
      int size = paths.size();
     
      int childCount = _getItemCount(context, node, component);

      // no kids, no breadcrumbs -- but you still get the span.
      int minChildCount = 0;
      if ( !renderLastChild(context, node))
        minChildCount = 1;

      if (childCount <= minChildCount )
      {
        component.setRowKey(oldPath);
        return;
      }

      // todo - I'm not calculating whether the item is visible or not
      int nextVisChildIndex = 1;

      for (int i = 0; i < size; i++)
      {
        //PageRendererUtils.setNewPath(context, component, i);

        if ( i + 1 == childCount)
          nextVisChildIndex=NO_CHILD_INDEX;
        else
          nextVisChildIndex = i + 1;
        component.setRowKey(paths.get(i));

        renderNode(context, stamp, nextVisChildIndex);
      }

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

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

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

    // Render the leading separator icon
    IconData icons = _getIconData(context);
    renderTableDataIcon(context, icons.leadingSeparator, null);

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

    if(stamp != null)
    {

      // Save the current key
      Object oldKey = 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 isRendered =
                getBooleanAttributeValue(context, stamp, RENDERED_ATTR, true);
               
          if (isRendered)
          {
            if (needsSeparator)
              renderBetweenNodes(context);
            else
              needsSeparator = true;
             
            renderStamp(context, stamp,i == rowIndex)
          }
        }       

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

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

    // Now, render our children
    super.renderContent(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();
        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);
          renderNode(context, stamp,i == rowIndex);
        }

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