-
1. Re: ExtendedDataTable: weird selection behavior
ammaletu Jun 3, 2010 7:43 AM (in response to ammaletu)To add to the above, I had time to look at the CSS classes with Firebug. The table is defined with selectedClass="rich-table-selected", so I would expect all selected rows to have this class.
Problem 1
Example: select line 1
CSS classes line 1: extdt-firstrow rich-extdt-firstrow odd extdt-row-selected rich-sdt-row-selected rich-table-selected extdt-row-active rich-sdt-row-active
Example: select line 1, then press Shift and select line 2
CSS classes line 1: extdt-firstrow rich-extdt-firstrow odd extdt-row-selected rich-sdt-row-selected
CSS classes line 2: extdt-firstrow rich-extdt-firstrow even extdt-row-selected rich-sdt-row-selected rich-table-selected extdt-row-active rich-sdt-row-active
This seems to be wrong, but the obvious workaround would be not to use the selectedClass attribute and instead to define all possible default classes in the stylesheet (we use both scrollable and extended data table and thought this would be easier).
Problem 2
Example: select line 1, then press Shift and select line 3
CSS classes line 1: extdt-firstrow rich-extdt-firstrow odd extdt-row-selected rich-sdt-row-selected
CSS classes line 2: extdt-firstrow rich-extdt-firstrow even extdt-row-selected rich-sdt-row-selected rich-table-selected
CSS classes line 3: extdt-firstrow rich-extdt-firstrow odd extdt-row-selected rich-sdt-row-selected rich-table-selected extdt-row-active rich-sdt-row-active
CSS classes line 4: extdt-firstrow rich-extdt-firstrow even extdt-row-selected rich-sdt-row-selected rich-table-selected
The backing bean confirms that in the last example actually four rows instead of three have been selected. Testing a bit more, it seems that a line that I haven't clicked on is only selected when I select multiple lines the last of which is the second-to-last line. In that case it will erroeously also select the last line. Selecting two or three lines works (apart from the first selected line not getting the right class) if I stay away from the end of the table.
This actually happens in your demo page, too: Select "Washington", press Shift and simultaneoulsy select "Wisconsin" -- four rows instead of three are selected, "Washington" to "Wyoming". So... Should I open a bug for this?!
-
2. Re: ExtendedDataTable: weird selection behavior
ilya_shaikovsky Jun 3, 2010 10:24 AM (in response to ammaletu)This actually happens in your demo page, too: Select "Washington", press Shift and simultaneoulsy select "Wisconsin" -- four rows instead of three are selected, "Washington" to "Wyoming". So... Should I open a bug for this?!
Issue for that already in jira. https://jira.jboss.org/browse/RF-8680
To add to the above, I had time to look at the CSS classes with Firebug. The table is defined with selectedClass="rich-table-selected", so I would expect all selected rows to have this class.
you could rise issue for that but in your case I think it would be easier not to wait (espesially considering the fact that 3.3.x is closed and not going to be released anymore) but use rich-* classes provided and if you have to differentiate them between tables - use selectors with id's or table styleClasses.
-
3. Re: ExtendedDataTable: weird selection behavior
ammaletu Jun 3, 2010 12:55 PM (in response to ilya_shaikovsky)Thanks for the information! I forgot to look for this on JIRA. :-/
As for the other problem: Yes, it's not terribly important and I just put all relevant classes in the CSS file since they're supposed to look the same in all tables anyway. I nonetheless created a JIRA entry for this so that others might not be confused by this in the future: https://jira.jboss.org/browse/RF-8726