0

I'm trying to use the custom control TextField Auto Complete of ControlsFX.

To do so I bind a TextField to an ObservableList :

AutoCompletionBinding<DataPointForIPP> autoCompletionBinding = TextFields.bindAutoCompletion(searchPlane.getSearchTextField(), listDataPoint.getObservableList());

It works great, except that when my ObservableList is updated, this is not the case of my autocompletion. So I have to call the binding again, which has no sense, since a binding is supposed to adapt to a changed of my list.

Did I miss something in the initilization ?

Evans Belloeil
  • 2,413
  • 7
  • 43
  • 76
  • Please post an [MCVE](http://stackoverflow.com/help/mcve). The method you are calling takes a `Collection`, which is not in general observable, not a JavaFX `ObservableList` specifically; so it is no surprised it does not bind to it. You probably want to use the [version that takes a `Callback`](http://controlsfx.bitbucket.org/org/controlsfx/control/textfield/TextFields.html#bindAutoCompletion-javafx.scene.control.TextField-javafx.util.Callback-) which will update the collection as the text changes. – James_D Jul 29 '15 at 23:53
  • Can you post an example of how `Callback` works ? And if it's not working I will post an MCVE. – Evans Belloeil Jul 30 '15 at 08:19
  • Please post an MCVE so others have an idea what you are trying to do. – James_D Jul 30 '15 at 10:05

0 Answers0