title: JavaFX ComboBox OnChangeListener rollback change
body: <p>I'm trying to reset the selection of a <code>ComboBox</code> like follows: </p>
  
  <pre><code>// private ListView&lt;MyEntityType&gt; f_lItems
  
  f_lItems.getSelectionModel().selectedItemProperty().addListener(new ChangeListener&lt;Object&gt;() {
      @Override
      public void changed(ObservableValue&lt;?&gt; ov, Object t, Object t1) {
          if (t1 != null &amp;&amp; t1 instanceof MyEntityType) {
  
              MyEntityType pv = (MyEntityType) t1;
              // do some condition testing
              if (condition) {
                  // accept 
              } else 
                  // roll back to previous item
                  f_lItems.getSelectionModel().select((MyEntityType) t);
              }
          }
      }
  });
  </code></pre>
  
  <p>So, after trying to reset the list to the old value I get this Exception:</p>
  
  <pre><code>Exception in thread "JavaFX Application Thread" java.lang.IndexOutOfBoundsException
      at com.sun.javafx.scene.control.ReadOnlyUnbackedObservableList.subList(Unknown Source)
      at javafx.collections.ListChangeListener$Change.getAddedSubList(Unknown Source)
      at com.sun.javafx.scene.control.behavior.ListViewBehavior.lambda$new$177(Unknown Source)
      at javafx.collections.WeakListChangeListener.onChanged(Unknown Source)
      at com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(Unknown Source)
  </code></pre>
  
  <p>As it seems I don't get the underlying behaviour of <code>List</code>s / <code>ObservableList</code>s for this case. </p>
  
  <p>Does anyone have suggestions how I could make this work?</p>
  
  <p>Thanks in advance
  Adam</p>