Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Best practice to avoid showing key values with OptionDataSources

    Hello,

    In our application, when we are using option data sources to pull data from, intermittently, the widgets are drawn before the values are really available. How this looks to the user is that the grid, or a form, is rendered with key values shown (numbers in our case) and immediately refreshed to show the actual mapped values (strings). Same happens with ListGrids with expansion components configured to be always visible: The grid is first rendered without any components shown and after a short while, rendered again with the expansion components visible. All this causes kind of flicker and non-necessary redraws. I'd like to point out that as far as I know, we are not doing anything really special rendering - this happens easily for example when the widgets are on different Tabs on a TabSet: When changing tabs, the content panel is rendered with this "flickering" often happening.

    Also, in our case, the option data sources we use are often client side option data sources without any server fetches - I'd expect these data sources to have the data immediately available so this kind of flicker should not happen. Before, this was not a real issue as we we're using direct valuemaps more. We started refactoring our code to use more optiondatasources due to the Chrome bug which shows the values in incorrect order and using optiondatasources was workaround for it. So, we are now seeing this more and more in our UI.

    Question: Is there a way to set up grids and forms so that they are drawn and shown to the user when the values from option data sources are really available ? Or some kind of other workaround to make the widgets render them in a more "lazy" manner to avoid these kinds of redraws ?

    We are currently using a recent nightly build of 5.0p. Thanks!

    #2
    This doesn't happen if you either use the strategy suggested in the listGridField.optionDataSource docs (of providing the displayValue right in the record) or if you use queuing (see RPCManager.startQueue()).

    Comment

    Working...
    X