-
Enhancement
-
Resolution: Unresolved
-
P4
-
fx2.0
One typical usecase for a FilteredList (or SortedList) is to be the source for a ListView or Table which should be updated when some user-editable controls change. For example a ListView + TextBox, where the LV will show only those rows that contain the substring entered by the user into the TextBox.
Currently to solve this one would make a FilteredList in batch mode the source of the ListView and in the onKeyReleased handler of the TextBox one would call filter(). A more convenient way to do this would be to add the FilteredList in live mode and call some method like myFilteredList.observeProperty(myTextBox.textProperty());
Now the Matcher would not only be fired when the underlying ObservableList of the FilteredList gets modified, but also when the TextBox changes.
An unobserveProperty() method would fit in well too.
Currently to solve this one would make a FilteredList in batch mode the source of the ListView and in the onKeyReleased handler of the TextBox one would call filter(). A more convenient way to do this would be to add the FilteredList in live mode and call some method like myFilteredList.observeProperty(myTextBox.textProperty());
Now the Matcher would not only be fired when the underlying ObservableList of the FilteredList gets modified, but also when the TextBox changes.
An unobserveProperty() method would fit in well too.