For my GWT project,
I initially constructed a List and a *KEY_PROVIDER* to uniquely identify my records in the List. Now instead of List I have connected to the Postgres database and am wondering as to if I need to pass an object of the ProvidesKey to the database OR remove it completely when using a database.
EARLIER-
// Make a provider, connect the List with the provider!
final ListDataProvider<Contact> sortProvider = new ListDataProvider<Contact>(KEY_PROVIDER);
sortProvider.setList(CONTACTS);
NOW-
// Create a data provider.
MyDataProvider sortProvider = new MyDataProvider();
sortProvider.addDataDisplay(table);
I am not sure how it needs to be done now?
Do I need to pass-
MyDataProvider sortProvider = new MyDataProvider(KEY_PROVIDER);
instead?
What should be the best practice? Thanks!