setSortContainerPropertyId and setSortAscending trigger an immediate fetch

I am using the LazyQueryContainer class for my table.
When initializing the code, I want to restore previously saved sort column and order, however:

  1. If I set those values before calling table.setContainerDataSource(lzContainer), the call is ignored.
  2. If I make those calls after calling table.setContainerDataSource(lzContainer), there are three data fetches instead of just one:
  • One fetch upon setting the container datasource.
  • One fetch upon calling setSortContainerPropertyId
  • One fetch upon calling setSortAscending.

Obviously this affects my application performance.
Idelally I would like to complete configuring the table column sorting parameters before it starts fetching data.



what you need is reasonable but is not current possible as far as I know, changing the data source will reset most (or all) settings.

What you could try is make your own extension of the Table, then call disableContentRefreshing() before starting to set up everything, and finally call enableContentRefreshing(true) when done. This should make sure that there is only one fetch operation.

I like the idea, perhaps I should change my request to see if you could add those two functions in the future (enable/disable content refresh)