2 Replies Latest reply on Oct 25, 2011 8:41 AM by Soto Roberto

    dropdownmenu style's possible bug

    Soto Roberto Newbie

      Hi,

       

      I've been trying to apply some specific styles on the RichFaces 4 DropDownMenu for a while now and I think there might be something wrong:

      The requirement is simple, the dropdown header has to have a background image that will change on mouse over.

       

      The thing is though .rf-ddm-lbl works, .rf-ddm-lbl :hover will override all its dependent MenuItems drawing the image behind them too. (I imagine that the hover event must be valid on the whole menu.) giving us kind of a chaotic esthetics... XD

      Of course that's probably not the right thing to do, so my next try is putting one image on .rf-ddm-lbl and the other on .rf-ddm-lbl-unsel, which is the closest idea I could find on the docs. However, it's like .rf-ddm-lbl-unsel never existed - and this is where I think there could be a bug - usin Firebug one can see that moving the mouse over and out of the dropdowns, similar properties exist called .rf-ddm-sel and .rf-ddm-unsel and are changing indeed. These can't be referenced on the css though...

      Also, looking for the way to apply a style to the header only and not the whole menu, I can see a property for which I haven't found no documentation nor mentions in forums: .rf-ddm-lbl-dec. This, I can use it to apply her my background style, but it doesn't have a hover either.

       

      May be i'm just not getting the whole picture, so any kind of comments are welcome.

      (I think this should be a pretty common requirement for people tryng to integrate RichFaces on projects that already have predefined styles.)

       

      Numerico,

      from Chile.

        • 1. Re: dropdownmenu style's possible bug
          Soto Roberto Newbie

          UPDATE :

          .rf-ddm-sel and .rf-ddm-unsel can be referenced in the css, but are being overwritten by an extra dropdownmenu.ecss.xhtml style!

           

          I do suggest the documentation to be updated though, as there's no referrence to these properties or whatsoever and all one can google about them is the source in svn... or is there a reason for this? may be they're not meant to be used?

           

          So the question would rather become, where does this style come from (may be from the skin?) and how to disable it? Please note that I am using plain skin so I would expected no styles to be applied. Also I have tried:

           

          {code:xml}<param-name>org.richfaces.CONTROL_SKINNING</param-name>

          <param-value>disable</param-value>{code}


          and

          {code:xml}<param-name>org.richfaces.CONTROL_SKINNING_CLASSES</param-name>

          <param-value>disable</param-value>{code}

           

          Hope someone can provide a hint.

          Thanks

          • 2. Re: dropdownmenu style's possible bug
            Soto Roberto Newbie

            Finally the solution was to write my own dropdownmenu.ecss class and put it in my WebContent/resources/css folder.

             

            Afterwards, I found other posts where it is said that writing the <h:outputStylesheet> inside the <h:head> tag would change the order of precedence, though it didn't work for me.

             

            Hope this helps somebody out there in cyberspace

             

             

            >:-{o