0

I've spent a number of days researching this particular issue and used many suggested solutions such as '.dispose()' that I thought might work but have not, but nothing specifically addresses this issue that I can find. I thought a 'superuser' may have experienced this issue or similar. I posted an issue on Git-Hub with details on this issue, of what I believe is a bug in the suggestionProvider parameter, not updating the auto-completion box with an updated list. The application using this ControlFX by FXExperience switches between databases, so the resulting JavaFX ComboBox updates with a new list of parameters specific to each database which are also passed to the Textfields.bindAutoCompletion method. Additionally, any time a database is switched, the defect in the suggestionProvider adds the new list to the old list as well.

I've recreated the details below because it has been sometime without no acknowledgement.You can see the issue here if necessary: https://github.com/controlsfx/controlsfx/issues/1126

Before Updating ComboBox And BindAuto Completion: This is data in the ComboBox and AutoComplete before updating Before Updating ComboBox And BindAuto Completion

Combo Set To Null: Topic ComboBox reset to null Combo Set To Null

Passing Null Value Only To ControlFX bindAutoComplete: Passing new values to bindAutoCompletion method Passing Null Value Only To ControlFX bindAutoComplete

No Items In ComboBox: ComboBox dropdown only shows null value item passed No Items In ComboBox

ControlsFX_bindAutoComplete Retains Old List: Controls bindAutoCompletion still retains the old list of items though it was passed updated parameters. ControlsFX_bindAutoComplete Retains Old List

1 Answer 1

0

I was able to resolve this issue. Rather than delete this post, I thought it would be useful to have something for the next person. The solution was quite simple. I could not get the .dispose() method to work. It was because the suggested AutoCompletionBinding declaration provided was incorrect. The .dispose() method would come up but since there was no error, I thought it was something else. This is the fix:

Do this (no type declaration):

AutoCompletionBinding auto = TextFields.bindAutoCompletion(myField, myList);

Do NOT do this:

AutoCompletionBinding<String> auto = TextFields.bindAutoCompletion(myField, myList);

After making this declaration, you simply call the .dispose() method prior to re-initializing your TextField or ComboBox with updated data.

auto.dispose();

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .