2 Replies Latest reply on Sep 5, 2012 3:45 AM by strannik

    itemClass in rich:panelMenu is not used

    strannik

      Hi, guys

       

      I'm trying to investigate behavior of rich:panelMenu component. I would like to change CSS for all the menu items at once.

      According to the docs, itemClass is applied to the panel menu items. However this attribute affects nothing.

      Below is my menu.

       

      <rich:panelMenu mode="ajax" itemClass="menu-item">
      <rich:panelMenuItem>
      <h:outputLink value="main">
      <h:outputText value="#{msg['leftmenu.main']}" />
      </h:outputLink>
      </rich:panelMenuItem>
      </rich:panelMenu>

       

      So I have to manually write class for each menu item, which is not so flexible.

       

      <rich:panelMenu mode="ajax">
      <rich:panelMenuItem styleClass="menu-item">
      <h:outputLink value="main">
      <h:outputText value="#{msg['leftmenu.main']}" />
      </h:outputLink>
      </rich:panelMenuItem>
      </rich:panelMenu>

       

       

      Please advise on the issue.

      RichFaces 4.2.2