-
1. Re: ExtendedDataTable filtering and select all
ilya_shaikovsky Apr 28, 2010 5:26 AM (in response to jonmoores)1 of 1 people found this helpful- If I use the SimpleSelection.clear() and SimpleSelection.setSelectAll(true|false) this leaves the selection object empty with only the 'selectAll' attribute of the selection set.
works as intended. Talking for example about scrollable table - you could have very large set of objects and we does not want to duplicate lists by moving all to the selection list. It's just flag for you to iterate over all the list in order to get selection. And table will do it out of the box.
- If I filter for a specific value and then select all and then remove the filter I would like to only have the items selected as were shown during filtering. This is not the case with SimpleSelection.setSelectAll(true).
this related to the same. selectAll() means that table has all the element selected. Doesn't matter if them selected with filtering or not. In order to select all considering selection - do not use the method and add only elements you need by using dataModel walk.
-
2. Re: ExtendedDataTable filtering and select all
jonmoores Apr 28, 2010 5:57 AM (in response to ilya_shaikovsky)Thanks for the info. Handy.
So... using the walk() method on the dataModel. I can walk the full range of the data provider no problem. That just gives back the rowKeyVars of all records with I can use to get the underlying data object. So how do I know which rows are currently visible in the rendered table (considering filtering and sorting)?
-
3. Re: ExtendedDataTable filtering and select all
ilya_shaikovsky Apr 28, 2010 6:35 AM (in response to jonmoores)Your model should be implemented properly as shown at richfaces-demo dataTable HibernateDataModel page.(full sources in svn)
-
4. Re: ExtendedDataTable filtering and select all
jonmoores Apr 28, 2010 6:55 AM (in response to ilya_shaikovsky)Seems that using ExtendedTableDataModifiableModel works ok.
Thanks!