}
private void image(FacesContext context, UIComponent component, String id)throws IOException {
ResponseWriter writer = context.getResponseWriter();
UIPanelMenu panelMenu = findMenu(component);
if(panelMenu == null){
return;
}
UIPanelMenuGroup panelMenuGroup = (UIPanelMenuGroup)component;
boolean isTopLevel = isTopLevel(panelMenuGroup);
boolean isOpened = isOpened(context,component);
String defaultIconNodeClosed = null;
if(isTopLevel){
if(panelMenuGroup.isDisabled()){
defaultIconNodeClosed = panelMenu.getIconTopDisableGroup();
if(defaultIconNodeClosed == null || defaultIconNodeClosed.equals("")){
defaultIconNodeClosed = panelMenu.getIconDisabledGroup();
}
} else {
defaultIconNodeClosed = panelMenu.getIconCollapsedTopGroup();
if(defaultIconNodeClosed == null || defaultIconNodeClosed.equals("")){
defaultIconNodeClosed = panelMenu.getIconCollapsedGroup();
}
}
} else {
if(panelMenuGroup.isDisabled()){
defaultIconNodeClosed = panelMenu.getIconDisabledGroup();
} else {
defaultIconNodeClosed = panelMenu.getIconCollapsedGroup();
}
}
if(defaultIconNodeClosed == null || defaultIconNodeClosed.equals("")){
defaultIconNodeClosed = DEFAULT_ICON;
}
String defaultIconNodeOpened = null;
if(isTopLevel){
defaultIconNodeOpened = panelMenu.getIconExpandedTopGroup();
if(defaultIconNodeOpened == null || defaultIconNodeOpened.equals("")){
defaultIconNodeOpened = panelMenu.getIconExpandedGroup();
}
} else {
defaultIconNodeOpened = panelMenu.getIconExpandedGroup();
}
if(defaultIconNodeOpened == null || defaultIconNodeOpened.equals("")){
defaultIconNodeOpened = DEFAULT_ICON;
}
String iconExpanded = "";