Share store between trees

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Share store between trees

Denis Rykov
I'm using my own tree-based custom widget in two places on the same page. The tree is based on the JsonRest store.

Is it possible to prevent the same requests to the server sent by second widget if the required data was already loaded by first widget?




--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Share store between trees

Karl Tiedt
It has been a while (literally years), so take this with a grain of salt, but from what I remember, as long as they are using the same Store, you should be safe... worst case, I believe adding a CacheStore wrapping the other Store would solve that problem if it doesnt just work.

 

-Karl Tiedt

On Fri, Jun 9, 2017 at 7:40 PM, Denis Rykov <[hidden email]> wrote:
I'm using my own tree-based custom widget in two places on the same page. The tree is based on the JsonRest store.

Is it possible to prevent the same requests to the server sent by second widget if the required data was already loaded by first widget?




--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Share store between trees

Denis Rykov

Karl, Thank you for response. The solution was to share ObjectStoreModel, not store itself.


10.06.2017 9:44 пользователь "Karl Tiedt" <[hidden email]> написал:
It has been a while (literally years), so take this with a grain of salt, but from what I remember, as long as they are using the same Store, you should be safe... worst case, I believe adding a CacheStore wrapping the other Store would solve that problem if it doesnt just work.

 

-Karl Tiedt

On Fri, Jun 9, 2017 at 7:40 PM, Denis Rykov <[hidden email]> wrote:
I'm using my own tree-based custom widget in two places on the same page. The tree is based on the JsonRest store.

Is it possible to prevent the same requests to the server sent by second widget if the required data was already loaded by first widget?




--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest



--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Loading...