Opened 11 years ago

Closed 7 years ago

#12572 closed defect (patchwelcome)

store.JsonRest with enhancedgrid cause undefined in url

Reported by: fabioginzel Owned by: Kris Zyp
Priority: high Milestone: tbd
Component: DojoX Grid Version: 1.6.0
Keywords: Cc:
Blocked By: Blocking:


	memoryStore = new{});
	restStore = new{target:"url/"});
	cacheStore = new, memoryStore)
	dataStore = new{objectStore: cacheStore});	

if click in sorting cause url: url/undefined?sort(+name)

sorry about my english

Change History (3)

comment:1 Changed 11 years ago by Jared Jurkiewicz

Owner: changed from Jared Jurkiewicz to Kris Zyp

comment:2 Changed 11 years ago by frans.van.nieuwenhoven

I ran into this problem as well and solved it with a small fix in

The cause of the problem is the query argument being undefined in the query function (line 115). Fixed by adding a line to the 'options.sort if':

if(options && options.sort){
	if (!query) query = "";   // prevent appending to undefined and null
	query += (query ? "&" : "?") + "sort(";
	for(var i = 0; i<options.sort.length; i++){
		var sort = options.sort[i];
		query += (i > 0 ? "," : "") + (sort.descending ? '-' : '+') + encodeURIComponent(sort.attribute);
	query += ")";

comment:3 Changed 7 years ago by bill

Component: DataDojoX Grid
Resolution: patchwelcome
Status: newclosed

DojoX Grid and EnhancedGrid are deprecated in favor of dgrid and gridx.

You should upgrade your code to use one of those two grids.

It's possible the community may consider patches to the old DojoX Grid code though.

Note: See TracTickets for help on using tickets.