protected void doExecute() throws Exception {
super.doExecute();
Set usersToSave = new HashSet();
final Group group = getGroup();
Groupable[] members = group.getMembers();
for (int i = 0; i < members.length; i++) {
if (members[i] instanceof User) {
usersToSave.add(members[i]);
}
}
group.removeAllMembers();
List groupUsers = (List) getParameter(GROUP_USERS);
for (Iterator i = groupUsers.iterator(); i.hasNext();) {
User user = (User) i.next();
group.add(user);
usersToSave.add(user);
}
for (Iterator i = usersToSave.iterator(); i.hasNext(); ) {
((User) i.next()).save();