JsonRestStore through SMD
When using a smd definition of a REST store the paging support is longer being looked at. Therefore the arguments of count and start are being ignored.
The getExecuter method overrides _getRequest without calling inherited or adding the functionality itself.
Here is a suggested fix:
In Rest.js
.
getExecutor : function(func,method,svc){
return new dojox.rpc.Rest(
method.name,
(method.contentType||svc._smd.contentType||"").match(/json|javascript/), // isJson
null,
function(id, args){
var request = svc._getRequest(method,[id]);
request.url= request.target + (request.data ? '?'+ request.data : '');
// Suggested Fix.
if(args && (args.start >= 0 || args.count >= 0)){
request.headers.Range = "items=" + (args.start || '0') + '-' + ((args.count && args.count != Infinity && (args.count + (args.start || 0) - 1)) || '');
}
return request;
}
);
}
.
.
.
Change History (7)
Component: |
General →
RPC
|
Owner: |
changed from anonymous to Dustin Machi
|
Resolution: |
→ fixed
|
Status: |
new →
closed
|
Resolution: |
fixed
|
Status: |
closed →
reopened
|
Owner: |
changed from Dustin Machi to kriszyp
|
Status: |
reopened →
new
|
Resolution: |
→ fixed
|
Status: |
new →
closed
|
Owner: |
changed from kriszyp to Kris Zyp
|
(In [20831]) jsonPathStore is out of sync due to the more advanced dojox.json capabilities. To avoid confusion with these, I'm removing this widget as I dont' plan to support it going forward. There is an equivalent widget which uses dojox.json ref and query in dojoc/dmachi/data called JsonStore? for those who still need this capability. While they are not drop in replacements of each other, they are pretty close and it should not take a significant amount of time to convert, and the benefits gained in performance and querying flexibility are worth it. closes #7473 closes #8175 closes #7331 closes #7403 closes #8312 closes #8334 closes #9976 closes #10290