I am working on an old code base which uses dojo datagrid and JsonRestStore, using declarative approach(in HTML). I am now trying to adapt this to use the newer dojo.store.JsonRest .
When I declare the JsonRest and ObjectStore in HTML, it works.
I want to use json.store.Cache as my store, with dojo.store.JsonRest and dojo.store.Memory backing it. The constructor for json.store.Cache takes two arguments.
a) Is there a possibility to define constructor arguments in HTML declarative style?
I didn't want to touch the (declarative) code of the Datagrid so I tried setting the store of the Grid in dojo.addOnLoad . I get a weird error in Firebug for dojo.js line 402 which is actually a comment:
// 5. Evaluated: the module was defined via define and the loader has evaluated the factory and computed a result.
My guess is that the error has nothing to do with dojo.js at all and the exception actually occurred in a closure somewhere(I think I've seen this before).
b) Is it possible to mix and match Declarative and Programmatic style in this way? And if yes, what event should I be setting the grid's store on?