简体   繁体   中英

dojo 1.7 data and store api confusion

I'm confused as to how the dojox.grid components (namely EnhancedGrid and LazyTreeGrid) are supposed to work with the new dojo store API, because it seems they don't.

I'm trying to create a web app using the two grids (one for flat data, the other for hierarchic data) and a JSON store with a custom rpc service (which is an option for the dojox.data.jsonRestStore, but not for the dojo.store.jsonRest) as the web app needs to be able to run behind a proxy which could potentially cause problems with 'PUT' and 'DELETE' requests.

The problem with the dojox.data.jsonRestStore is that I can't get it to run with a lazyTreeGrid (for each record it gets from the initial get it calls another get with an empty query, essentially causing the browser the hang and making hundreds to thousands of requests). Apart from that, it obviously shouldn't be used anymore since it uses the "old" dojo data API as opposed to the new dojo store API.

Now that other problem is, that the dojox.grids seem to be still using the old data API aswell, meaning I'd have to use a dojo.data.objectStore in order to get them to work with the new dojo.store.jsonRest, but that doesn't work either as the objectStore doesn't seem to work with lazy load and hierarchic data. Also as mentioned, there doesn't seem to be a way to define a custom rpc service for the new dojo.store.jsonRest, but I need that so I can make alle requests using GET and POST methods only.

So, all in all, I'm pretty confused as to how those components are supposed to work together, but maybe I'm missing something? Are there alternatives to the dojox.grid components that support things like nested sorting, lazy loading, treegrid-like behaviour?

Or is it simply too early to start using the new dojo store API?

Have you looked at dgrid ? My understanding is that the dojox.grid.* grids will be deprecated in favor of dgrid in the future. It still has the beta label but it is built from the ground up with the dojo.store API.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM