Examples of UIXPage


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

    UIXRenderingContext context,
    UINode           node,
    UINode           renderingUINode
    ) throws IOException
  {
    UIXPage page = (UIXPage)node.getUIComponent();
    Object focusPath = page.getFocusRowKey();
    PageRendererUtils.setFocusPath(context, focusPath);
    super.renderWithNode(context, node, renderingUINode);
    PageRendererUtils.setFocusPath(context, null);
  }
View Full Code Here

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

    public Object getValue(
      UIXRenderingContext context
    )
    {
      UINode node = (UINode)_componentBV.getValue(context);
      UIXPage component = (UIXPage)node.getUIComponent();
      Object oldPath = component.getRowKey();

      boolean isNewPath = PageRendererUtils.setNewPath(context,
                                                       component,
                                                       _startDepth);
      if (!isNewPath)
        return Boolean.FALSE;

      if (component.getRowCount() > 0)
      {
        boolean isTree = false;
        int i = 0;
        while (!isTree && i < component.getRowCount())
        {
          component.setRowIndex(i);
          if (component.isContainer() && !component.isContainerEmpty())
          {
            isTree = true;
          }
          i++;
        }
        component.setRowKey(oldPath);

        return Boolean.valueOf(_isDataATree == isTree);
      }
      component.setRowKey(oldPath);
      return Boolean.FALSE;
    }
View Full Code Here

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

    Map<String, String> parameters =
      context.getExternalContext().getRequestParameterMap();
   
    String source = parameters.get(UIConstants.SOURCE_PARAM);
   
    UIXPage page = (UIXPage)component;
   
    // the path needs to be set correctly before calling
    // page.getClientId
    String treeId = page.getClientId(context) + TREE_SUFFIX;
   
    if ( treeId.equals(source))
    {         
      TreeUtils.decodeExpandEvents(parameters, page, Collections.emptyList());
      RequestContext afContext = RequestContext.getCurrentInstance();
View Full Code Here

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

    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

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

    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

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

    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

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

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

    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

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

    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

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

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