Hello,
I have a DataSource that retrieves tables names from a DB. I have a different tab that the users need to set the database server where the tables are located. So if they go into that tab and change the database server, my DataSource should now return the table names in the newly selected database server. The logic behind changing the database server works, but my DataSource only gets updated when I refresh (F5) the whole page.
Is there a way to get the DataSource to re-fetch its data?
I've tried datasource.fetch() and datasource.setCacheMaxAge(1), but it didn't work. I'm using 2.4.0.
Thanks.
***** EDIT ***** SOLVED *****
I had to do setOptionDataSource(datasource) for the new list to take affect. My bad.
***** EDIT ***** SOLVED *****
I have a DataSource that retrieves tables names from a DB. I have a different tab that the users need to set the database server where the tables are located. So if they go into that tab and change the database server, my DataSource should now return the table names in the newly selected database server. The logic behind changing the database server works, but my DataSource only gets updated when I refresh (F5) the whole page.
Is there a way to get the DataSource to re-fetch its data?
I've tried datasource.fetch() and datasource.setCacheMaxAge(1), but it didn't work. I'm using 2.4.0.
Thanks.
***** EDIT ***** SOLVED *****
I had to do setOptionDataSource(datasource) for the new list to take affect. My bad.
***** EDIT ***** SOLVED *****