Package org.primefaces.model

Examples of org.primefaces.model.TreeNodeChildren.toArray()


     */
    public static void sortNode(TreeNode node, Comparator comparator) {
        TreeNodeChildren children = (TreeNodeChildren) node.getChildren();
       
        if(children != null && !children.isEmpty()) {
            Object[] childrenArray = children.toArray();
            Arrays.sort(childrenArray, comparator);
            for(int i = 0; i < childrenArray.length; i++) {
                children.setSibling(i, (TreeNode) childrenArray[i]);
            }
           
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.