private void updateRowKeys(TreeNode node) { int childCount = node.getChildCount(); if (childCount > 0) { for (int i = 0; i < childCount; i++) { TreeNode childNode = node.getChildren().get(i); String childRowKey = (node.getParent() == null) ? String.valueOf(i) : node.getRowKey() + "_" + i; childNode.setRowKey(childRowKey); updateRowKeys(childNode); } } } }
public void updateRowKeys(TreeNode node) { int childCount = node.getChildCount(); if (childCount > 0) { for (int i = 0; i < childCount; i++) { TreeNode childNode = node.getChildren().get(i); String childRowKey = (node.getParent() == null) ? String.valueOf(i) : node.getRowKey() + "_" + i; childNode.setRowKey(childRowKey); updateRowKeys(childNode); } } }
private void updateRowKeys(TreeNode node) { int childCount = node.getChildCount(); if (childCount > 0) { for (int i = 0; i < childCount; i++) { TreeNode childNode = node.getChildren().get(i); String childRowKey = (node.getParent() == null) ? String.valueOf(i) : node.getRowKey() + "_" + i; childNode.setRowKey(childRowKey); updateRowKeys(childNode); } } }
public void buildRowKeys(TreeNode node) { int childCount = node.getChildCount(); if (childCount > 0) { for (int i = 0; i < childCount; i++) { TreeNode childNode = node.getChildren().get(i); if (childNode.isSelected()) { addToPreselection(childNode); } String childRowKey = (node.getParent() == null) ? String.valueOf(i) : node.getRowKey() + "_" + i; childNode.setRowKey(childRowKey); buildRowKeys(childNode); } } }
protected void encodeMarkup(FacesContext context, Tree tree) throws IOException { boolean vertical = tree.getOrientation().equals("vertical"); TreeNode root = tree.getValue(); if (root != null && root.getRowKey() == null) { root.setRowKey(ROOT_ROW_KEY); tree.buildRowKeys(root); tree.initPreselection(); } if (vertical) { encodeVerticalTree(context, tree, root); } else { encodeHorizontalTree(context, tree, root); } }
root.setRowKey(ROOT_ROW_KEY); tree.buildRowKeys(root); tree.initPreselection();
root.setRowKey(ROOT_ROW_KEY); tree.buildRowKeys(root); tree.initPreselection();
root.setRowKey(ROOT_ROW_KEY); tt.buildRowKeys(root); tt.initPreselection();
private void updateRowKeys(TreeNode node) { int childCount = node.getChildCount(); if (childCount > 0) { for (int i = 0; i < childCount; i++) { TreeNode childNode = node.getChildren().get(i); String childRowKey = (node.getParent() == null) ? String.valueOf(i) : node.getRowKey() + "_" + i; childNode.setRowKey(childRowKey); updateRowKeys(childNode); } } } }
public void updateRowKeys(TreeNode node) { int childCount = node.getChildCount(); if (childCount > 0) { for (int i = 0; i < childCount; i++) { TreeNode childNode = node.getChildren().get(i); String childRowKey = (node.getParent() == null) ? String.valueOf(i) : node.getRowKey() + "_" + i; childNode.setRowKey(childRowKey); updateRowKeys(childNode); } } }
private void updateRowKeys(TreeNode node) { int childCount = node.getChildCount(); if (childCount > 0) { for (int i = 0; i < childCount; i++) { TreeNode childNode = node.getChildren().get(i); String childRowKey = (node.getParent() == null) ? String.valueOf(i) : node.getRowKey() + "_" + i; childNode.setRowKey(childRowKey); updateRowKeys(childNode); } } }
public void buildRowKeys(TreeNode node) { int childCount = node.getChildCount(); if (childCount > 0) { for (int i = 0; i < childCount; i++) { TreeNode childNode = node.getChildren().get(i); if (childNode.isSelected()) { addToPreselection(childNode); } String childRowKey = (node.getParent() == null) ? String.valueOf(i) : node.getRowKey() + "_" + i; childNode.setRowKey(childRowKey); buildRowKeys(childNode); } } }
/** * @param node */ private void updateRowKeys(TreeNode node) { if (!node.isExpanded()) { return; } int count = node.getChildCount(); List<TreeNode> children = node.getChildren(); for (int i = 0; i < count; i++) { TreeNode childNode = children.get(i); String rowKey; if (node.getParent() == null) { rowKey = String.valueOf(i); } else { rowKey = node.getRowKey() + "_" + i; } childNode.setRowKey(rowKey); if (childNode.isExpanded()) { updateRowKeys(childNode); } } } }
protected void encodeMarkup(FacesContext context, Tree tree) throws IOException { boolean vertical = tree.getOrientation().equals("vertical"); TreeNode root = (TreeNode) tree.getValue(); if (root != null && root.getRowKey() == null) { root.setRowKey("root"); tree.buildRowKeys(root); tree.initPreselection(); } if (vertical) { encodeVerticalTree(context, tree, root); } else { encodeHorizontalTree(context, tree, root); } }
root.setRowKey("root"); tree.buildRowKeys(root); tree.initPreselection();
root.setRowKey("root"); tree.buildRowKeys(root); tree.initPreselection();
root.setRowKey("root"); tt.buildRowKeys(root); tt.initPreselection();