List privileges = new ArrayList(); String[] accessPrivs = GrouperHelper.getGroupPrivs(grouperSession); for(int i=0;i<accessPrivs.length;i++) { privileges.add(accessPrivs[i].toLowerCase()); }  Subject grouperAll = SubjectFinder.findById("GrouperAll"); Map selectedPrivs = GrouperHelper.getImmediateHas(grouperSession,GroupOrStem.findByGroup(grouperSession,group),MemberFinder.findBySubject(grouperSession,grouperAll)); Map selected = new HashMap(); Map.Entry entry; String key; Iterator it = selectedPrivs.entrySet().iterator(); while(it.hasNext()) { entry = (Map.Entry)it.next(); key = (String)entry.getKey(); selected.put(key.toLowerCase(),entry.getValue()); }  request.setAttribute("privileges",privileges); request.setAttribute("preSelected",selected);
	public ActionForward grouperExecute(ActionMapping mapping, ActionForm form,			HttpServletRequest request, HttpServletResponse response,			HttpSession session, GrouperSession grouperSession)			throws Exception {		DynaActionForm groupForm = (DynaActionForm) form;				session.setAttribute("subtitle", "groups.action.edit");				setBrowseMode("Manage",session);				//Identify and instantiate group to edit		String curNode = (String)groupForm.get("groupId");		Group group = GrouperHelper.groupLoadById(grouperSession,				curNode);		Map groupAsMap = new GroupAsMap(group,grouperSession);				//Setup form bean so Struts can autofill form fields		groupForm.set("groupName", group.getName().substring(				group.getName().lastIndexOf(HIER_DELIM) + 1));		//groupForm.set("groupType", group.getTypes());		groupForm.set("groupDisplayName", groupAsMap.get("displayExtension"));		groupForm.set("groupDescription", groupAsMap.get("description"));		request.setAttribute("editMode", Boolean.TRUE);		request.setAttribute("browseParent", GrouperHelper.group2Map(				grouperSession, group));		request.setAttribute("allGroupTypes",GroupTypeFinder.findAll());		request.setAttribute("selectedGroupTypes",group.getTypes());		return mapping.findForward(FORWARD_EditGroup);	}