UIComponent child = (UIComponent) iterator.next();
if(child instanceof UIPanelBarItem && child.isRendered()){
Map item = new HashMap();
UIPanelBarItem panelBarItem = (UIPanelBarItem) child;
item.put(id_ref, panelBarItem.getClientId(context));
Object enterScript = panelBarItem.getAttributes().get("onenter");
Object leaveScript = panelBarItem.getAttributes().get("onleave");
if (enterScript != null && !enterScript.equals("")) {
JSFunctionDefinition onenter = new JSFunctionDefinition();
onenter.addParameter("event");
onenter.addToBody(enterScript);