3 Replies Latest reply on Sep 3, 2009 8:52 AM by Matthias Age

    How to highlight rows in a rich:extendedDataTable when the m

    Matthias Age Newbie

      Hi

      1) If I try to follow the instructions from the RichFacesFAQ "1.69. How to highlight rows in a dataTable when the mouse is over?" it doesn't work for me on a rich:extendedDataTable.

      2) If I convert the table to a rich:dataTable it works


      3) using the a4jSkin variable doesn't work in either case.
      I tried to put #{a4jSkin.tableFont} on the facelets page, but nothing appears.

      #{a4jSkin} is resolved, I see the following output:

      Skin: SkinImpl: {warningBackgroundColor=#FF0000, headerWeightFont=bold, tableBorderColor=#C0C0C0, controlTextColor=#000000, headerTextColor=#FFFFFF, generalTextColor=#000000, selectControlColor=#E79A00, headerGradientColor=#93C4E5, tableSubfooterBackgroundColor=#f1f1f1, trimColor=#C6D6EA, shadowOpacity=1, tipBorderColor=#E5973E , calendarCurrentBackgroundColor=#FF7800, subBorderColor=#ffffff, editorBackgroundColor=#F1F1F1, generalLinkColor=#0078D0, gradientType=plain, tabSizeFont=11, calendarHolidaysTextColor=#FF7800, buttonSizeFont=11, headerBackgroundColor=#4A75B5, hoverLinkColor=#0090FF, tabFamilyFont=Arial, Verdana, sans-serif, calendarSpecBackgroundColor=#E4F5E2, calendarHolidaysBackgroundColor=#FFEBDA, tabDisabledTextColor=#6A92CF, tableBorderWidth=1px, buttonFamilyFont=Arial, Verdana, sans-serif, generalFamilyFont=Arial, Verdana, sans-serif , tableBackgroundColor=#FFFFFF, calendarWeekBackgroundColor=#F5F5F5, tipBackgroundColor=#FAE6B0 , calendarCurrentTextColor=#FFEBDA, editBackgroundColor=#FEFFDA, shadowBackgroundColor=#000000, headerFamilyFont=Arial, Verdana, sans-serif, tableFooterBackgroundColor=#cccccc, additionalBackgroundColor=#EAF0F8, panelBorderColor=#C0C0C0, visitedLinkColor=#0090FF, controlBackgroundColor=#ffffff, calendarSpecTextColor=#000000, tabBackgroundColor=#9FBDEB, generalBackgroundColor=#F3F2F2, generalSizeFont=11px, warningColor=#FFE6E6, headerSizeFont=11px}


      I can try any of these attributes, but nothing is found.

      If I search the component via
      Component.getInstance("a4jSkin");
      in my java-code, I find an object of type org.richfaces.skin.SkinBean but the keySet of it is null.

      Any hints?


      Thanks
      Matthias

        • 1. Re: How to highlight rows in a rich:extendedDataTable when t
          Ilya Shaikovsky Master

           

          2) If I convert the table to a rich:dataTable it works


          in my java-code, I find an object of type org.richfaces.skin.SkinBean but the keySet of it is null.


          I confused with how it works for dataTable if you talking later that it's not resolved correctly at all.

          <rich:extendedDataTable onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
           onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"


          works for me fine for extendedDataTable.

          • 2. Re: How to highlight rows in a rich:extendedDataTable when t
            Matthias Age Newbie

            Hi,

            if I put this

            onRowMouseOver="this.style.font = 'bold 30pt Arial'"
            onRowMouseOut="this.style.font='30pt Arial'"


            on rich:extendedDataTable it works, but if I try to use
            onRowMouseOut="this.style.font='#{a4jSkin.tableFont}'"

            then I get a Javascript error and the onRowMouse-event does not occur.
            It doesn't find #{a4jSkin.tableFont} (if I output this expression via h:outputText it's void).
            If I try <h:outputText value="#{a4jSkin}" /> I see the output shown in my original post (that means that the a4jSkin variable is found).
            If I try to output <h:outputText value="#{a4jSkin.warningBackgroundColor}" /> it doesn't output anything althought for #{a4jSkin} I see
            Skin: SkinImpl: {warningBackgroundColor=#FF0000, ...


            So I don't understand:
            a) which properties can I use on a4jSkin
            b) what does the output (for #{a4jSkin})
            Skin: SkinImpl: {warningBackgroundColor=#FF0000,...
            mean if I can't use
            <h:outputText value="#{a4jSkin.warningBackgroundColor}" />

            ?

            Thx
            Matthias


            • 3. Re: How to highlight rows in a rich:extendedDataTable when t
              Matthias Age Newbie


              I'm sorry, my post is nonsense.
              I had an error in my configuration-files,
              now it works as expected.

              I apologize
              Matthias