I have a model class:
public class Client {
private long id;
private String name;
@Override
public String toString() {
return this.name;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
and I have a Textfield
that I want to use auto complete using a list of Client
class, using ControlsFX, here is what I did:
AutoCompletionBinding<Client> binding = TextFields.bindAutoCompletion(searchField, SuggestionProvider.create(appState.clients));
Where appStat.Clients
is a list of Client
class. For some reason I get no suggestions appearing. What am I doing wrong?