Package org.apache.myfaces.trinidad.component

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


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

    //UIXNavigationPath component = (UIXNavigationPath) node.getUIComponent();
    UIXPage component = (UIXPage) node.getUIComponent();
    Object  focusRowKey = component.getFocusRowKey();
    int childCount = 0;

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

      childCount = component.getDepth(focusRowKey) + 1;

      if (childCount <= minChildCount )
        return;

    }
View Full Code Here


    UIXRenderingContext context,
    UINode           node
    ) throws IOException
  {

    UIXPage component = (UIXPage) node.getUIComponent();
    UINode stamp = this.getNamedChild(context, node, NODE_STAMP_CHILD);
    if(stamp == null)
      return;

    // Save the current path
    Object oldPath = component.getRowKey();
    Object focusRowKey = component.getFocusRowKey();
    int startDepth = 0;

    // when you get the focusPath the menuModel may not restore the path
    // properly, so be sure to set the path to the value you want after the
    // call to getFocusPath.
    component.setRowKey(null);
    List<Object> focusPath = Collections.EMPTY_LIST;
    if (focusRowKey != null)
    {
      focusPath = component.getAllAncestorContainerRowKeys(focusRowKey);
      focusPath = new ArrayList<Object>(focusPath);
      focusPath.add(focusRowKey);
    }

    int size = focusPath.size();
    if (focusRowKey != null )
    {
      if ( size > startDepth )
      {
        component.setRowKey(focusPath.get(startDepth));
      }
      else
      {
        // Restore the current path
        component.setRowKey(oldPath);
        return;
      }
    }
    else
    {
      // Restore the current path
      component.setRowKey(oldPath);
      return;
    }


    for (int i = startDepth; i < size; i++)
    {
      component.setRowKey(focusPath.get(i));
      renderStamp(context, node, stamp, (i+1 == size));

    }

    // Restore the current path
    component.setRowKey(oldPath);

  }
View Full Code Here

    UINode           node
    ) throws IOException
  {
    boolean initialLinkSelectedStatus = LinkUtils.isSelected(context);
    UINode pageNode = context.getParentContext().getAncestorNode(0);
    UIXPage component = (UIXPage) pageNode.getUIComponent();

    UINode stamp = this.getNamedChild(context, pageNode, NODE_STAMP_CHILD);
    if(stamp == null)
      return;

    // Save the current path
    int startDepth = getIntAttributeValue(context, node, LEVEL_ATTR, 0);
    Object oldPath = component.getRowKey();
    boolean isNewPath = PageRendererUtils.setNewPath(context, component, startDepth);
    if (!isNewPath)
      return;

    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))
        renderBetweenNodes(context);
    }

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

    // Reset the selected status, which might have been changed on rendering
    LinkUtils.setSelected(context, initialLinkSelectedStatus);
  }
View Full Code Here

    UIXRenderingContext context,
    UINode           node
    )
  {
    UINode pageNode = context.getParentContext().getAncestorNode(0);
    UIXPage component = (UIXPage) pageNode.getUIComponent();
    int startDepth = getIntAttributeValue(context, node, LEVEL_ATTR, 0);

    return PageRendererUtils.isEmpty(context, component, startDepth);
  }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidad.component.UIXPage

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.