Ext-js data store sharing
In the context of Ext-js datastore. is it a good practice to share data store across multiple components(eg. combobox, grid). Currently have multiple lists(presented in grids) where I allow user to save their preferences:
list1, choose a color list2, choose a style ...
these preferences use a single datastore X.
user can add or remove on each list.
on a separate gui user have these list represented in comboboxes cb1, cb2. is it a good idea for these comboboxes also use the datastore X and do filter on i开发者_Go百科t?
thanks
Found this question while retagging, so for posterity...
A data store in Ext can easily (and appropriately) be shared among multiple widgets, provided that
- The data (including sort order, filtering, etc.) required by each widget is identical
- You expect data changes originating in one widget to be reflected in all other widgets backed by the same store
In this case, it sounds like the proper approach.
精彩评论