Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#10290 closed defect (fixed)

JsonRestStore through SMD

Reported by: arichter Owned by: Kris Zyp
Priority: high Milestone: 1.4
Component: RPC Version: 1.4.0b
Keywords: Cc:
Blocked By: Blocking:

Description

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)

comment:1 Changed 10 years ago by bill

Component: GeneralRPC
Owner: changed from anonymous to Dustin Machi

comment:2 Changed 10 years ago by Dustin Machi

Resolution: fixed
Status: newclosed

(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

comment:3 Changed 10 years ago by bill

Milestone: tbd1.4

comment:4 in reply to:  2 Changed 9 years ago by dreddy

Resolution: fixed
Status: closedreopened

i think it's a mistake, this is not about the jsonPathStore component but the dojox JsonRestStore? component. and the bug is still alive.

comment:5 Changed 9 years ago by Dustin Machi

Owner: changed from Dustin Machi to kriszyp
Status: reopenednew

comment:6 Changed 9 years ago by Kris Zyp

Resolution: fixed
Status: newclosed

(In [23423]) Add range header, fixes #10290

comment:7 Changed 9 years ago by bill

Owner: changed from kriszyp to Kris Zyp
Note: See TracTickets for help on using tickets.