{
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((List)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 childrenGroup = service.getGroupHandler().findGroups(selectGroup_);
sibblingGroup = service.getGroupHandler().findGroups(parentGroup);
tree.setSibbling((List)sibblingGroup);
tree.setChildren((List)childrenGroup);
tree.setSelected(selectGroup_);
tree.setParentSelected(parentGroup);
}