4 Replies Latest reply on Dec 6, 2011 11:38 AM by ujjets

    Problem using Richfaces styles

    ujjets Newbie

      Hi,

       

      I am using Richfaces 3.3.1,Seam 2.2.0 ,JSF 1.2.

       

      I am trying to apply a rich faces style to a div :

       

      <div style="width: 200px;" class="rich-combobox-font rich-combobox-shell">

       

      This class is in:

       

      a4j/s/3_3_1.GAcss/combobox.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.seam

       

      But the file is not loaded.I cannot see the file in the html output.

       

      I am able to see other files like :

       

      <link class="component" type="text/css" rel="stylesheet" href="/XXX/a4j/s/3_3_1.GAcss/simpleTogglePanel.xcss/DATB/eAE7ff3HutDlM6QBGgsE-A__.seam">

       

      but not the combobox.xcss.

      It works fine if I manually load the file.

      Not sure what I am missing.

      Any help appreciated.

       

      Thanks.


        • 1. Re: Problem using Richfaces styles
          Paul Dijou Newbie

          I think RichFaces only load files required on each page. Meaning that if you don't use a comboBox component, the comboBox CSS file will not be loaded. Try to add a comboBox, just for test, and see if it add the CSS file. At least, it's the case in last version of RichFaces, not sure about 3.3.1

          • 2. Re: Problem using Richfaces styles
            ujjets Newbie

            Hello Paul,

             

            Many thanks for your response.

            I tried adding a dummy combo box and voilà !!!

            The styles were being applied.

            I really do not need that component, but looks like I need that hack for the page to work unless there are any other suggestions.

            Thanks again.

            • 3. Re: Problem using Richfaces styles
              Paul Dijou Newbie

              You're welcome

               

              I think adding the CSS file of the combo box manually is a better solution than having a dummy combo box in your page (even if you don't display it). What you really need is only the CSS file, and adding a combo box will probably include other files (like javascript scripts) that you don't need (and you will have a ugly HTML source code with a useless combo box ^^).

               

              You can load the CSS file on a template if you need the CSS class a lot or only on this particular page.

              • 4. Re: Problem using Richfaces styles
                ujjets Newbie

                OK Paul.

                Will probably go with adding the styles manually.

                Appreciate your taking the time.