0 Replies Latest reply on Feb 21, 2008 4:18 AM by ybxiang.wolf

    How to change style of rich:panelMenu's seletedChild's

    ybxiang.wolf

      rich:panelMenu has an attribute "selectedChild" which can be used to set the active child. Normally, the selected child's background is not changed, Now, where can i set something to make the item's background red automatically when it's selected?

      I looked for doc, but do not find something like "selectedChildStyle" or "selectedChildStyleClass".

      I tried to find the solution by google.com, but got nothing.


      Please help me. If rich:panelMenu has no such feature, i hope it will be added in future.

      Any tips will be appreciated!




      ===============================
      <rich:panelMenu style="width:200px" mode="ajax"
      iconExpandedGroup="disc" iconCollapsedGroup="disc"
      iconExpandedTopGroup="triangleUp" iconGroupTopPosition="right"
      iconCollapsedTopGroup="triangleDown" iconCollapsedTopPosition="right" selectedChild="selectedChildName">

      <rich:panelMenuGroup label="Group 1" expanded="true">
      <rich:panelMenuItem label="Item 1.1" action="#{panelMenu.updateCurrent}">
      <f:param name="current" value="Item 1.1"/>
      </rich:panelMenuItem>
      <rich:panelMenuItem label="Item 1.2" action="#{panelMenu.updateCurrent}">
      <f:param name="current" value="Item 1.2"/>
      </rich:panelMenuItem>
      <rich:panelMenuItem label="Item 1.3" action="#{panelMenu.updateCurrent}">
      <f:param name="current" value="Item 1.3"/>
      </rich:panelMenuItem>
      <rich:panelMenuGroup label="Group 1.4" expanded="true">
      <rich:panelMenuItem label="Item 1.4.1" name="selectedChildName" action="#{panelMenu.updateCurrent}">
      <f:param name="current" value="Item 1.4.1"/>
      </rich:panelMenuItem>
      </rich:panelMenuGroup>
      </rich:panelMenuGroup>

      </rich:panelMenu>