9 Replies Latest reply on Jun 10, 2009 7:54 AM by derkd

    changing font color in scrollableDataTable

    derkd

      Hi all,

      I do not quite understand how the css works in richfaces. When I have a stylesheet in my war, richfaces is overrulling that one I think, because when I do stuf like this

      .rich-sdt-row-selected {
      background-color: #0092CE;
      }

      in the page itself I get the preferred color. When I put this in my stylesheet I don't get the preferred color instead I get the skin color.

      That's not the main problem here, my problem is that I can't get the color of the font in white when the row is selected. Can somebody explain this to me?

        • 1. Re: changing font color in scrollableDataTable
          nbelaevski

          Hi,

          You can check this easily using Firebug tool.

          • 2. Re: changing font color in scrollableDataTable
            ilya_shaikovsky

            seems you should redefine the corresponding active class also. It's applied after the selected class.

            • 3. Re: changing font color in scrollableDataTable
              derkd

               

              "ilya_shaikovsky" wrote:
              seems you should redefine the corresponding active class also. It's applied after the selected class.


              Hi Ilya,

              Yes you are right about the fact that it is applied after the selected class but for example when I do this:
              .rich-sdt-row-active {
              background-color: #0092CE;
              color: #ffffff;
              }
              

              the whole row is white, what I want is that the row is blue and the font color is white... Do you have any ideas?

              • 4. Re: changing font color in scrollableDataTable
                ilya_shaikovsky

                strange.. I tried to check it live at demosite and this:

                 <style>
                 .scrolls{
                 width:300px;
                 height:200px;
                 overflow:auto;
                 }
                 .rich-sdt-row-selected {
                 background-color: #0092CE;
                 color:brown;
                 }
                 </style>
                 <h:form>
                 <rich:spacer height="30" />
                 <rich:scrollableDataTable rowKeyVar="rkv" frozenColCount="1" height="400px"
                 width="700px" id="carList" rows="40" columnClasses="col"
                 value="#{dataTableScrollerBean.allCars}" var="category" sortMode="single"
                 binding="#{dataTableScrollerBean.table}"
                 sortOrder="#{dataTableScrollerBean.order}"
                 selection="#{dataTableScrollerBean.selection}">
                


                just works for me. Also I moved the declaration to external stylesheet and it also works.. Please check with fireBug as Nick adviced.

                • 5. Re: changing font color in scrollableDataTable
                  derkd

                   

                  "ilya_shaikovsky" wrote:
                  strange.. I tried to check it live at demosite and this:
                   <style>
                   .scrolls{
                   width:300px;
                   height:200px;
                   overflow:auto;
                   }
                   .rich-sdt-row-selected {
                   background-color: #0092CE;
                   color:brown;
                   }
                   </style>
                   <h:form>
                   <rich:spacer height="30" />
                   <rich:scrollableDataTable rowKeyVar="rkv" frozenColCount="1" height="400px"
                   width="700px" id="carList" rows="40" columnClasses="col"
                   value="#{dataTableScrollerBean.allCars}" var="category" sortMode="single"
                   binding="#{dataTableScrollerBean.table}"
                   sortOrder="#{dataTableScrollerBean.order}"
                   selection="#{dataTableScrollerBean.selection}">
                  


                  just works for me. Also I moved the declaration to external stylesheet and it also works.. Please check with fireBug as Nick adviced.


                  Yes indeed its strange, could it be a bug of richfaces 3.1.6.SR1?

                  I will check it with firebug, thanks!!!

                  • 6. Re: changing font color in scrollableDataTable
                    ilya_shaikovsky

                    I should ask it from the beginning :)

                    Yes.. It could be the reason. Unfortunately this branch not officially supported (It not about forums, you are always welcome there but about fixes for the branch).. So please try to overcome this using firebug and report the results if you will not able to find the workaround.

                    • 7. Re: changing font color in scrollableDataTable
                      derkd

                       

                      "ilya_shaikovsky" wrote:
                      I should ask it from the beginning :)

                      Yes.. It could be the reason. Unfortunately this branch not officially supported (It not about forums, you are always welcome there but about fixes for the branch).. So please try to overcome this using firebug and report the results if you will not able to find the workaround.


                      Hi Ilya,

                      I think this is a bug in 3.1.6.SR1, I checked it with firebug. If I do this in firebug on the demo site:
                      .rich-sdt-row-active {
                       background-color: #ffead9;
                      color: #ffffff;
                       }

                      I get what I expected, if I do this with richfaces 3.1.6.SR1, I do not get this, instead I get a white row :(

                      I'm not yet able to figure out a workaround :(


                      • 8. Re: changing font color in scrollableDataTable
                        ilya_shaikovsky

                         

                        I get what I expected, if I do this with richfaces 3.1.6.SR1

                        not sure that got it.

                        B.t.w. your environment could not be updated to JSF 1.2 ?

                        • 9. Re: changing font color in scrollableDataTable
                          derkd

                          No I can't updated to jsf 1.2 because I'm stuck with that crappy Oracle AS 10.1.3.4. Otherwise I would have used the latest and greatest 3.3.1, seam 2.1.2 and JBoss AS 5.0.1 :-) Too bad for me :-(

                          I think I will just have to deal with this, hoping my client would accept it.