List<UIComponent> children = toolbar.getChildren();
if (children != null) {
for (UIComponent child : children) {
if (child.isRendered()) {
if (child instanceof AbstractToolbarGroup) {
AbstractToolbarGroup group = (AbstractToolbarGroup) child;
String location = group.getLocation();
if (location != null && location.equalsIgnoreCase(Locations.RIGHT.toString())) {
childrenToTheRight.add(child);
} else {
childrenToTheLeft.add(child);
}