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/ClientFilterlisted 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/faqBook:
http://dojotoolkit.org/docs/bookForums:
http://dojotoolkit.org/forumDojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest