2 Replies Latest reply on Sep 9, 2014 3:09 AM by Lionel Bartel

    [solved] rich:panelMenu itemLeftIcon doesn't show

    Lionel Bartel Newbie

      Hello community,

       

      I use Richfaces 4.3.7 Final.

       

      I try to get a grid icon left of each item in a panelMenu.

       

      To do it, I use the following syntax :

      <rich:panelMenu groupMode="server" itemMode="server"  itemLeftIcon="grid">

       

       

      but, left icon doesn't show.

       

      When I use :

      <rich:panelMenu groupMode="server" itemMode="server" itemRightIcon="grid">

       

       

      right icon shows as expected.

       

      The HTML generated for the left icon (in a panelMenuItem) is :

      <td class="rf-pm-itm-ico rf-ico-grid" style="padding-left: 20px;"/>

       

       

       

      The CSS class rf-ico-grid contains a "background-image" of the grid icon, but the CSS class rf-pm-itm-ico contains a "background-image: none;".

       

      I assume this is a bug of panelMenu. Is it possible to fix it ? Or is there somebody having a work around ?

       

      Thank you.

       

      Lionel

        • 1. Re: rich:panelMenu itemLeftIcon doesn't show
          Michal Petrov Master

          Hi,

           

          I've tried on it on showcase and it works fine (just change rf-ico-disc to rf-ico-grid). Are you using any skin? Does the image URL lead to the proper image?

          The CSS class rf-ico-grid contains a "background-image" of the grid icon, but the CSS class rf-pm-itm-ico contains a "background-image: none;".

          That doesn't matter, the class that is defined later overrides the ones before it. The stylesheet inspector should show you which one of the rules is used.

          • 2. Re: rich:panelMenu itemLeftIcon doesn't show
            Lionel Bartel Newbie

            Hi,

             

            Thank you for your answer, you made me find the answer.

             

            Somebody in the team overrided rf-pm-itm-ico (in a CSS stylesheet file in an unusual directory) to a new URL and my CSS inspector showed none as the URL led to nothing.

             

            My bad, I didn't pay enough attention to a file that shouldn't be there (for a couple of days). But, thank to you, I found it

             

            Lionel