Package org.richfaces.model

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


  }
 
  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

    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

    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

    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

  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

Related Classes of org.richfaces.model.ListRowKey

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.