1 Reply Latest reply on Jul 12, 2011 9:29 AM by Justin Sweeney

    Richfaces 4 DropDownMenu Styling

    Justin Sweeney Newbie

      I am attempting to override the default styling for the Richfaces 4 DropDownMenu using css.

       

      In Richfaces 3.3.3, there was an attribute on the DropDownMenu for selectedLabelClass, allowing for the specification of a css class for the dropdownmenu label when it is selected. This attribute apprently no longer exists in Richfaces 4, how can I accomplish the same overriding of the default styling to have a custom css class used for a selected dropdownmenu label?

       

      Thanks!

        • 1. Re: Richfaces 4 DropDownMenu Styling
          Justin Sweeney Newbie

          There appears to be larger issues with combining skinning with css, unless I am doing something wrong. When I use skin in my application and then try to override a specific component with custom css, the css is ignored and the skin is used regardless. For example, if I define a panel as follows:

           

          <rich:panel header="My Accounts" id="searchResultsPanel" styleClass="search_panel" headerClass="search_panel_header" width="100%">

           

          Despite having the styleClass and headerClass, the panel shows up using the styling that is defined in the skin. The skin styling is also used if I attempt to override the panel css classes, rf-p-hdr for example, in my css file.

           

          In Firebug, the above component shows up having both my css class, search_panel_header and the standard richfaces class using the skin, rf-p-hdr, so my css class is there, but is just not being applied.

           

          If I override the ecss file for Richfaces and use that using h:outputStylesheet, then it works using the style I want.

           

          Is this a bug or am I doing something wrong? Any thoughts?

           

          Thanks!

           

          Justin