Package net.sf.archimede.jsf.view

Examples of net.sf.archimede.jsf.view.ViewUser


   
    public String removeUserFromGroup() throws ObjectLockedException, ObjectExistsException {
        ViewGroup viewGroup = (ViewGroup) collectionGroups.getRowData();
        Group group = viewGroup.getGroup();

        ViewUser viewUser = (ViewUser) viewGroup.getUsersModel().getRowData();
        group.getUsers().remove(viewUser.getUser());
       
        GroupDao.createInstance().update(group);
       
        viewUser.setMember(false);
       
        return "";
    }
View Full Code Here


    }
   
    public String addUserToGroup() throws ObjectLockedException, ObjectExistsException {
        ViewGroup viewGroup = (ViewGroup) this.collectionGroups.getRowData();
       
        ViewUser viewUser = (ViewUser) viewGroup.getUsersModel().getRowData();
        Group group = viewGroup.getGroup();
        if (group.getUsers() == null) {
            group.setUsers(new ArrayList());
        }
        group.getUsers().add(viewUser.getUser());
       
        GroupDao.createInstance().update(group);
       
        viewUser.setMember(true);
       
        return "";
    }
View Full Code Here

TOP

Related Classes of net.sf.archimede.jsf.view.ViewUser

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.