Unanswered: How to create different views of same store?
Unanswered: How to create different views of same store?
How do I create three different "views" of the same data by filtering on different values in the JSON?
I've got some JSON data with a contentGroup value. I want to make three different DataViews, each showing the items from that same JSON but for different values of contentGroup. So the first DataView shows items where contentGroup is 1, the second DataView shows items where contentGroup is 2, and the third DataView has (you guessed it) items where contentGroup is 3.
I've seen some implementations where people make three different stores, the second and third stores use the first as the source (haven't been able to make that work for me). Is that the "right" way to do it?
As long as you don't need to show different data set (like each have a different sort or filter) then you can use the same store on each view with no issues, you just need to get the store instance
That's precisely what I need to do. I've got a vbox that has three dataviews. Each dataview draws from the same store. I want to show different subsets of the same data in each dataview. I understand that applying a filter to a store will affect all elements feeding from the store. Can I duplicate the store so that the second and third stores can use different filters? Or load the data from store 1 to store 2 and 3?