binding - Update autoComplete JavaFx? -


i working on javafx project. when add new elements in table of database should update autocomplete ,i did problem showing double context-menu ,we can double autocompletes because call method create autocomplete each adding of new elements.

i call method each adding:

public void pushbills() {      arraylist list = new arraylist<>();      bills = new billheaderdao().findall();      (int = 0; < bills.size(); i++) {          list.add(bills.get(i).getidclient());      }      autocompletionbinding = textfields.bindautocompletion(searchbill, suggestionprovider.create(list));  } 

how can resolve problem ?

description of problem

this trick: instead of: textfields.bindautocompletion(textfield, list); , try this:

list<string> strings = new arraylist<>(); 

then create binding between textfield list through:

new autocompletiontextfieldbinding<>(textfield, suggestionprovider.create(strings));  

so changes, including removing, list, reflected in autocompletion of textfield; , have dynamic filtering of suggestions, showed in pop-up, when user enter text in textfield;


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -