This content has been marked as final. Show 5 replies
I think you need to remove the rows from the observable list of items backing the view.
No, I want that the TableView has the responsability to filter his rows like the JTable with the TableRowSorter.setRowFilter(...)
The intention before JavaFX 2.0 shipped was to include FilteredList and SortedList collection classes that would wrap an ObservableList and work as you would expect, in a very 'glazedlists' kind of way. Unfortunately, due to concerns about the API these were removed prior to JavaFX 2.0 shipped, and will return in JavaFX 3.0: http://javafx-jira.kenai.com/browse/RT-17053
Unfortunately there are no plans to introduce API to support this directly on TableView as this API would be redundant in a short while. Your best option is to run an external iteration on the TableView.items list when your filter criteria changes, and to remove/add items from a master list into the TableView.items list. Any changes you make to this list will be immediately reflected on screen.
Somebody could also write a glazed lists - to - ObservableList adapter, I would imagine.
@JonathanGiles, @Richard Bair:
Ok, Waiting for the JavaFX 3.0, I manage this by an external list filter wich interact with the items of the TableView (as you proposed Jonathan)
Thanks for your responses!