Examples of ListRowKey


Examples of org.richfaces.component.ListRowKey

  private HtmlTree tree;

  public String expand() {
    if (expandPath != null && expandPath.length() != 0) {
      try {
        tree.queueNodeExpand(new ListRowKey(expandPath));
      } catch (IOException e) {
        e.printStackTrace();
      }
    }
View Full Code Here

Examples of org.richfaces.component.ListRowKey

      ArrayList<Long> list = new ArrayList<Long>();
      for (int n = 0; n <= i; n++) {
        list.add(path.get(n));
      }

      ListRowKey key = new ListRowKey(list);
      try {
        ((HtmlTree) tree).queueNodeExpand(key);
      } catch (IOException e) {
        e.printStackTrace();
      }
View Full Code Here

Examples of org.richfaces.component.ListRowKey

    ArrayList<Long> list = new ArrayList<Long>();
    for (int i = 0; i < path.size(); i++) {
      list.add(path.get(i));
    }
    ListRowKey key = new ListRowKey(list);
    TreeState ts = (TreeState) tree.getComponentState();

    ts.setSelected(key);
    ts.setSelected(null);
    ts.saveState(FacesContext.getCurrentInstance());
View Full Code Here

Examples of org.richfaces.model.ListRowKey

  public void mergeSubState(TreeRowKey rowKey, TreeState subState) {
    Iterator<TreeRowKey> iter = subState.expandedNodes.iterator();
    while (iter != null && iter.hasNext()) {
      TreeRowKey key = iter.next().getSubKey(1);
      if (key.depth() > 0) {
          expandedNodes.add(new ListRowKey((ListRowKey)rowKey, (ListRowKey)key));
      } else if (!expandedNodes.contains(rowKey)) {
          expandedNodes.add(rowKey);
      }
    }

    Iterator<Entry<TreeRowKey, NodeState>> sItr = subState.queuedNodeStates.entrySet().iterator();
    while (sItr.hasNext()) {
      Entry<TreeRowKey, NodeState> entry = sItr.next();
      TreeRowKey key = entry.getKey().getSubKey(1);
     
      TreeRowKey newKey;
     
      if (key.depth() > 0) {
        newKey = new ListRowKey((ListRowKey)rowKey, (ListRowKey)key);
      } else {
        newKey = rowKey;
      }

      addQueuedState(newKey, entry.getValue());
View Full Code Here

Examples of org.richfaces.model.ListRowKey

  }
 
  public void testGetAsString() throws Exception {
    Converter converter = new TreeRowKeyConverter();
   
    ListRowKey key = new ListRowKey(Arrays.asList("test", Long.valueOf(456), Integer.valueOf(123)));
   
    String string = converter.getAsString(facesContext, tree, key);
    assertEquals("test:456:123:", string);
 
    string = converter.getAsString(facesContext, tree, null);
View Full Code Here

Examples of org.richfaces.model.ListRowKey

    UITreeNode defaultFacet = tree.getOrCreateDefaultFacet();
    defaultFacet.getChildren().add(input1);

    tree.setNodeFace("node");
    tree.setRowKey(new ListRowKey(null, "testId"));
    Iterator dataChildren = tree.dataChildren();
    assertTrue(dataChildren.hasNext());
    assertSame(treeNode, dataChildren.next());
    assertFalse(dataChildren.hasNext());
View Full Code Here

Examples of org.richfaces.model.ListRowKey

    ArrayList keyBase = new ArrayList();
    keyBase.add("string");
    keyBase.add(new Object());
    keyBase.add(new Long(-17));

    this.treeRowKey = new ListRowKey(keyBase);
    this.event = new ExpandNodeCommandEvent(application.createComponent(UITree.COMPONENT_TYPE), treeRowKey);
  }
View Full Code Here

Examples of org.richfaces.model.ListRowKey

    ArrayList keyBase = new ArrayList();
    keyBase.add("string");
    keyBase.add(new Object());
    keyBase.add(new Long(-17));

    this.treeRowKey = new ListRowKey(keyBase);
    this.event = new CollapseNodeCommandEvent(application.createComponent(UITree.COMPONENT_TYPE), treeRowKey);
  }
View Full Code Here

Examples of org.richfaces.model.ListRowKey

  public void mergeSubState(TreeRowKey rowKey, TreeState subState) {
    Iterator<TreeRowKey> iter = subState.expandedNodes.iterator();
    while (iter != null && iter.hasNext()) {
      TreeRowKey key = iter.next().getSubKey(1);
      if (key.depth() > 0) {
          expandedNodes.add(new ListRowKey((ListRowKey)rowKey, (ListRowKey)key));
      } else if (!expandedNodes.contains(rowKey)) {
          expandedNodes.add(rowKey);
      }
    }

    Iterator<Entry<TreeRowKey, NodeState>> sItr = subState.queuedNodeStates.entrySet().iterator();
    while (sItr.hasNext()) {
      Entry<TreeRowKey, NodeState> entry = sItr.next();
      TreeRowKey key = entry.getKey().getSubKey(1);
     
      TreeRowKey newKey;
     
      if (key.depth() > 0) {
        newKey = new ListRowKey((ListRowKey)rowKey, (ListRowKey)key);
      } else {
        newKey = rowKey;
      }

      addQueuedState(newKey, entry.getValue());
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.