In the meantime I was able to fix this.
The problem originated from the fact that when sorting first and then
changing the amount of columns the lists which contain the mapping between
the indices of the original column order and the now sorted order are not
being reset.
So before filling the table again all I had to do was, to reset the sort
criteria of the table... and voila.


schneidc wrote:
> 
> Hi,
> 
> I encountered the following problem: I have a data table with several
> columns (each sortable) looking like e.g.
> 
> |Name|Street|City|...
> 
> There are also input fields with which the user can filter the contents of
> the table. E.g. in the "city" input field when he enters "L*" and hits an
> "update"-button only rows are displayed where city starts with an 'L'. So
> far this is working fine UNTIL one tries to sort the table first and
> filter afterwards. This weirdly results in an empty table. If all the
> filter input fields are cleared and the update-button hit again the table
> is filled as if nothing happened.
> 
> This is really a showstopper for us and I have no idea what might cause
> the problem. At least on managed bean side, I don't see anything that
> might cause the problem.
> 
> 
> Cheers
> Simon
> 
> EDIT
> Just found out after more testing, that sometimes filtering after sorting
> works partially, meaning that the table is not totally empty but not all
> the rows which would match the filter are displayed (although of course
> the underlying list of table objects has the correct amount).
> 

-- 
View this message in context: 
http://old.nabble.com/-Trinidad--Re-populating-DataTable-after-sorting%2C-results-in-empty-table-tp29148077p29224905.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Reply via email to