title: FilteredList setPredicate() only reevaluates once
body: <p>I have a FilteredList building a TableView set up according to the example in <a href="http://code.makery.ch/blog/javafx-8-tableview-sorting-filtering/" rel="nofollow">http://code.makery.ch/blog/javafx-8-tableview-sorting-filtering/</a>.</p>
  
  <p>The default predicate works fine and when the PropertyChangeListener fires the setPredicate() method is invoked correctly every time but only the FIRST invocation results in the running of the predicate filter code and the subsequent updating of the TableView.  </p>
  
  <p>What have I missed here?</p>
  
  <pre><code>@Override // This method is called by the FXMLLoader when initialization is complete
  public void initialize(URL fxmlFileLocation, ResourceBundle resources) {
  
  .
  .
  .
      // Wrap the ObservableList in a FilteredList (initially display all data).
      FilteredList&lt;Filedata&gt; filteredData = new FilteredList&lt;&gt;( eeModel.data, p -&gt; true );
  
      // 2. Set the filter Predicate whenever the filter changes.
  
      FilterDataClass.addPropertyChangeListener( new PropertyChangeListener()  {
  
          @Override
          public void propertyChange(PropertyChangeEvent evt) {
              System.out.println("PCE...");
  
              filteredData.setPredicate(fd -&gt; {
                  if ( FilterDataClass.getFilenameDupe() == FilterDataClass.FilterStatus.cbIGNORE ) {
                      return true;
                  }
                  else if ( (FilterDataClass.getFilenameDupe() == FilterDataClass.FilterStatus.cbON) &amp;&amp; fd.isFilenameDuplicate() ) {
                      return true;                        
                  }
                  else if ( (FilterDataClass.getFilenameDupe() == FilterDataClass.FilterStatus.cbOFF) &amp;&amp; !fd.isFilenameDuplicate() ) {
                      return true;                        
                  }   
                  else {
                          return false;                                                               
                  }                                       
              });                         
          }
      });
  
  
      // Wrap the FilteredList in a SortedList. 
      SortedList&lt;Filedata&gt; sortedList = new SortedList&lt;&gt;( filteredData );
  
      // create a TableView with the sorted list set as the items it will show
      table.setItems( sortedList );
  
      // bind the sortedList comparator to the TableView comparator
      sortedList.comparatorProperty().bind(table.comparatorProperty());
  
  
  }   
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>Might this be an optimisation issue?  If I add some junk code to the predicate that requires the evaluation of the event data, such as:</p>
  
  <pre><code>                    if ( evt.getNewValue() == evt.getOldValue() ) {
                      System.out.println("This should never happen");
                  }
  </code></pre>
  
  <p>then the predicate gets reevaluated.</p>