Package org.openfaces.testapp.datatable

Examples of org.openfaces.testapp.datatable.Permission


    private static final String ALL_ITEMS = "<All>";


    public TreeTableRequestBean() {
        Random rand = new Random();
        Permission userManagement = new Permission("1", "User Management #" + String.valueOf(rand.nextInt(37000)));
        Permission documentBrowsing = new Permission("2", "Document Browsing #" + String.valueOf(rand.nextInt(37000)));
        Permission documentCreation = new Permission("3", "Document Creation #" + String.valueOf(rand.nextInt(37000)));
        Permission documentModification = new Permission("4", "Document Modification #" + String.valueOf(rand.nextInt(37000)));
        Permission documentDeletion = new Permission("5", "Document Deletion #" + String.valueOf(rand.nextInt(37000)));
        Permission networkAccess = new Permission("6", "Network Access #" + String.valueOf(rand.nextInt(37000)));
        permissions.add(userManagement);
        permissions.add(documentBrowsing);
        permissions.add(documentCreation);
        permissions.add(documentModification);
        permissions.add(documentDeletion);
View Full Code Here


    public List getUsersTreeChildren() {
        Object node = Faces.var("node");
        if (node == null)
            return permissions;
        if (node instanceof Permission) {
            Permission permission = (Permission) node;
            return getUsersWithPermission(permission);
        }
        return null;
    }
View Full Code Here

            TreePath nodePath = (TreePath) path;
            if (nodePath.getLevel() == 0) {
                continue;
            }
            User user = (User) nodePath.getValue();
            Permission permission = (Permission) nodePath.getParentPath().getValue();
            user.getPermissions().remove(permission);
        }
        treeDemoSelectedNodePaths = null;
        return null;
    }
View Full Code Here

TOP

Related Classes of org.openfaces.testapp.datatable.Permission

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.