5 Replies Latest reply on Feb 9, 2010 12:01 PM by konstantin.mishin

    scrollableDataTable onmouseover

    gluafamichl

      Hi,

       

      scrollableDataTable does not support dataTable's onrowmousover / onrowmouseout. Is there any other way to change the background color of the table row currently under the mouse cursor? We tried jquery, but we were not able to define a valid selector, "#table-id tr" always selects the complete table.

       

      We are using JBoss Portal 2.7.2, PortletBridge 2.0 Beta and Richfaces 3.3.2

       

      Thanks and best regards,

      Stefan

        • 1. Re: scrollableDataTable onmouseover
          konstantin.mishin

          Hello.

          Try to use next selector: "#table-id tr.rich-sdt-row"

          • 2. Re: scrollableDataTable onmouseover
            gluafamichl

            Hi,

             

            thanks, that works nearly as expected. One problem is left. Our table has two frozen columns. The jquery code now only updates the two frozen columns or the scrollable ones, depending om where the mouseover event occurs. This is the jquery code:

             

                             <rich:jQuery selector="#catalog-table-grid tr.rich-sdt-row"
                                query="mouseover(function(){jQuery(this).addClass('active-row')})"/>
                            <rich:jQuery selector="#catalog-table-grid tr.rich-sdt-row"
                                query="mouseout(function(){jQuery(this).removeClass('active-row')})"/>

             

            Any idea, what to add instead if "this" as argument to be able to update both parts of the complete row?

             

            Thanks and best regards,

            Stefan Waldner

            • 3. Re: scrollableDataTable onmouseover
              konstantin.mishin
              Id of "frozen" part of row and id of "normal" part have one constant difference. See these ids for more information.
              • 4. Re: scrollableDataTable onmouseover
                gluafamichl

                Hi,

                 

                do you mean the rich-std-fb / rich-std-nb?

                 

                I'm not quite sure how to add these to the jquery call to change to color of the complete row. That's the actual code:

                 

                <rich:jQuery selector="#catalog-table-grid tr.rich-sdt-row"
                     query="mouseover(function(){jQuery(this).addClass('active-row')})"/>

                 

                I think I need a second call like jquery(this), but I don't know what to write instead of this to be able to change the color of the frozen and the normal body at once.

                 

                Thanks and best regards,

                Stefan Waldner

                • 5. Re: scrollableDataTable onmouseover
                  konstantin.mishin
                  I meen that this.id in this case should be for exemple clienIdOfScrollableDataTable:f:6 or clienIdOfScrollableDataTable:n:6. You can replase ":f:" or ":n:" and find other part or row.