Class OrganigramHelper
- java.lang.Object
-
- org.primefaces.component.organigram.OrganigramHelper
-
public final class OrganigramHelper extends Object
Some helpers methods for the organigram model/component.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidbuildRowKeys(OrganigramNode node)Loops theOrganigramNodes and generates a rowKey for each node on the basis of the parent and child index.static OrganigramNodefindTreeNode(OrganigramNode searchRoot, String rowKey)Finds aOrganigramNodefor the given rowKey.static OrganigramNodefindTreeNode(OrganigramNode searchRoot, OrganigramNode selection)Finds aOrganigramNodefor the given selection.
-
-
-
Method Detail
-
findTreeNode
public static OrganigramNode findTreeNode(OrganigramNode searchRoot, String rowKey)
Finds aOrganigramNodefor the given rowKey.- Parameters:
searchRoot- TheOrganigramNodeto start the search.rowKey- The rowKey.- Returns:
- The
OrganigramNodefor the rowKey ornull.
-
findTreeNode
public static OrganigramNode findTreeNode(OrganigramNode searchRoot, OrganigramNode selection)
Finds aOrganigramNodefor the given selection.- Parameters:
searchRoot- TheOrganigramNodeto start the search.selection- The selection.- Returns:
- The
OrganigramNodefor the selection ornull.
-
buildRowKeys
public static void buildRowKeys(OrganigramNode node)
Loops theOrganigramNodes and generates a rowKey for each node on the basis of the parent and child index.- Parameters:
node- The root node.
-
-