public void changeGroup(String groupId) throws Exception {
OrganizationService service = getApplicationComponent(OrganizationService.class);
UIBreadcumbs uiBreadcumb = getChild(UIBreadcumbs.class);
uiBreadcumb.setPath(getPath(null, groupId));
UITree tree = getChild(UITree.class);
Collection<?> sibblingGroup;
if (groupId == null) {
sibblingGroup = service.getGroupHandler().findGroups(null);
tree.setSibbling(sibblingGroup);
tree.setChildren(null);
tree.setSelected(null);
selectGroup_ = null;
return;
}
selectGroup_ = service.getGroupHandler().findGroupById(groupId);
String parentGroupId = null;
if (selectGroup_ != null) {
parentGroupId = selectGroup_.getParentId();
}
Group parentGroup = null;
if (parentGroupId != null) {
parentGroup = service.getGroupHandler().findGroupById(parentGroupId);
}
Collection<Group> childrenGroup = service.getGroupHandler().findGroups(selectGroup_);
sibblingGroup = service.getGroupHandler().findGroups(parentGroup);
tree.setSibbling(sibblingGroup);
tree.setChildren(childrenGroup);
tree.setSelected(selectGroup_);
tree.setParentSelected(parentGroup);
}