« Return to Thread: [Q] input arguments to JsonRestStore vs PersevereStore

Re: [Q] RESOLVED input arguments to JsonRestStore vs PersevereStore

by V S P :: Rate this Message:

Reply to Author | View in Thread

Got the
client side querying of the Perserve data store to work

Maulins reply had me going in right direction about using clientFetch

but this web page
http://docs.dojocampus.org/dojox/data/ClientFilter

listed one more thing to get this to work (that I was missing)

-----
To use the ClientFilter with a data store which offers optional support
of ClientFilter (like dojox.data.ServiceStore and
dojox.data.JsonRestStore), it's important to observe the correct
sequence:
include dojox.data.ClientFilter
include the data store

set queryOptions:{cache:true} in the request

or use a Widget with a option to cache each request (for example the
Grid with the queryOptions attribute:

<table queryOptions="{cache:true}" dojoType="dojox.grid.DataGrid" ...)
-----------------


I was missing the 'or' part -- that is enabling in the Grid
queryOptions="{cache:true}"


I had option set on the store, then on the query, but not on the grid.

And I guess that was causing not being able to find any items except the
last added one,
and it was causing queries to go to the server.


The only remaining part for me to resolve now is why

> crmService.post = function(id, value) {
> console.log('calling add with id:',id, ' and value: ',value);
> return dojo.xhrPost({url:"addService", handleAs:'json',
> content:{action:'add',"id":id, "value":value}});
> };


does not get the id argument populated when invoked (I assume it is the
identity for the row being inserted)

VSP

--
Vlad P
author of C++  ORM  http://github.com/vladp/CppOrm/tree/master


--
http://www.fastmail.fm - Access your email from home and the web

_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://dojotoolkit.org/docs/book
Forums: http://dojotoolkit.org/forum
Dojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

 « Return to Thread: [Q] input arguments to JsonRestStore vs PersevereStore