-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
fx2.0
Try using a callback such as the following, and observe that the old value is always -1
listView.getSelectionModel().selectedIndexProperty().addListener(new ChangeListener<Number>() {
public void changed(ObservableValue<? extends Number> ov, Number t, Number t1) {
System.out.println("change listener: " + t + " -> " + t1);
}
});
Workaround: Developer can locally record the old value of the selected index within the ChangeListener anonymous inner class.
listView.getSelectionModel().selectedIndexProperty().addListener(new ChangeListener<Number>() {
public void changed(ObservableValue<? extends Number> ov, Number t, Number t1) {
System.out.println("change listener: " + t + " -> " + t1);
}
});
Workaround: Developer can locally record the old value of the selected index within the ChangeListener anonymous inner class.