private List<String> listMemberhip;
public UIGroupMembershipSelector() throws Exception
{
UIBreadcumbs uiBreadcumbs = addChild(UIBreadcumbs.class, "BreadcumbGroupSelector", "BreadcumbGroupSelector");
UITree tree = addChild(UITree.class, "UITreeGroupSelector", "TreeGroupSelector");
OrganizationService service = getApplicationComponent(OrganizationService.class);
Collection<?> sibblingsGroup = service.getGroupHandler().findGroups(null);
Collection<?> collection = service.getMembershipTypeHandler().findMembershipTypes();
listMemberhip = new ArrayList<String>(5);
for (Object obj : collection)
{
listMemberhip.add(((MembershipType)obj).getName());
}
listMemberhip.add("*");
tree.setSibbling((List)sibblingsGroup);
tree.setIcon("GroupAdminIcon");
tree.setSelectedIcon("PortalIcon");
tree.setBeanIdField("id");
//tree.setBeanLabelField("groupName");
tree.setBeanLabelField("label");
uiBreadcumbs.setBreadcumbsStyle("UIExplorerHistoryPath");
}