Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#6569 closed defect (fixed)

QueryReadStore/DojoData/Grid grabs all rows if formatter does not return

Reported by: guest Owned by: Bryan Forbes
Priority: high Milestone: 1.2
Component: DojoX Grid Version: 1.1.0
Keywords: QueryReadStore DojoData Grid Cc: awhite@…
Blocked By: Blocking:

Description

I have a Grid hooked to a QueryReadStore? through DojoData?. I have a simple formatter:

dkp.eventTypeFormat=function(value,rowIndex){
	if(value==0){
		return "Joined Raid";
	}
	if(value==1){
		return "Left Raid";
	}
	console.debug("Unknown value/index",value,rowIndex);
	return "Unknown Event";
}

Originally I did not have the default "Unknown Event" return. Without it, the Grid pulled in ALL the rows through the QueryReadStore? instead of paging. After adding this statement I see:

POST http://localhost/webws/ajaxDkp/src/core/data/raid/items.php (51ms)dojo.js.uncompres... (line 7434)
selected tab container child: eventscommon.js (line 162)
Creating grid: eventscommon.js (line 185)
Unknown value/index ? 0common.js (line 47)
POST http://localhost/webws/ajaxDkp/src/core/data/raid/events.php (52ms)dojo.js.uncompres... (line 7434)
Unknown value/index ? 0common.js (line 47)
Unknown value/index ? 1common.js (line 47)
Unknown value/index ? 2common.js (line 47)
Unknown value/index ? 3common.js (line 47)
Unknown value/index ? 4common.js (line 47)
Unknown value/index ? 5common.js (line 47)
Unknown value/index ? 6common.js (line 47)
Unknown value/index ? 7common.js (line 47)
Unknown value/index ? 8common.js (line 47)
Unknown value/index ? 9common.js (line 47)
Unknown value/index ? 10common.js (line 47)
Unknown value/index ? 11common.js (line 47)
Unknown value/index ? 12common.js (line 47)
Unknown value/index ? 13common.js (line 47)
Unknown value/index ? 14common.js (line 47)
Unknown value/index ? 15common.js (line 47)
Unknown value/index ? 16common.js (line 47)
Unknown value/index ? 17common.js (line 47)
Unknown value/index ? 18common.js (line 47)
Unknown value/index ? 19common.js (line 47)
Unknown value/index ? 20common.js (line 47)
Unknown value/index ? 21common.js (line 47)
Unknown value/index ? 22common.js (line 47)
Unknown value/index ? 23common.js (line 47)
Unknown value/index ? 24common.js (line 47)
Unknown value/index ... 0common.js (line 47)
Unknown value/index ... 1common.js (line 47)
Unknown value/index ... 2common.js (line 47)
Unknown value/index ... 3common.js (line 47)
Unknown value/index ... 4common.js (line 47)
Unknown value/index ... 5common.js (line 47)
Unknown value/index ... 6common.js (line 47)
Unknown value/index ... 7common.js (line 47)
Unknown value/index ... 8common.js (line 47)
Unknown value/index ... 9common.js (line 47)
Unknown value/index ... 10common.js (line 47)
Unknown value/index ... 11common.js (line 47)
Unknown value/index ... 12common.js (line 47)
Unknown value/index ... 13common.js (line 47)
Unknown value/index ... 14common.js (line 47)
Unknown value/index ... 15common.js (line 47)
Unknown value/index ... 16common.js (line 47)
Unknown value/index ... 17common.js (line 47)
Unknown value/index ... 18common.js (line 47)
Unknown value/index ... 19common.js (line 47)
Unknown value/index ... 20common.js (line 47)
Unknown value/index ... 21common.js (line 47)
Unknown value/index ... 22common.js (line 47)
Unknown value/index ... 23common.js (line 47)
Unknown value/index ... 24

As the grid boots up. So there are two issues here:

  1. Why is the formatter being called with bad values (?, and '...')

Formatters should not be called when the data is being loaded and cells contain '...'

  1. If a formatter doesn't return and the return is undefined, it should not break paging and pull in all the rows.

Unfortunately, I was unable to isolate a demonstration. If you need more information email me.

Change History (4)

comment:1 Changed 11 years ago by Jared Jurkiewicz

Component: DojoX DataDojoX Grid
Owner: changed from Jared Jurkiewicz to sorvell

Formatter issues are grid issues, not datastore issues. Datastores know nothing about grid and how the formatter code works.

comment:2 Changed 11 years ago by Bryan Forbes

Owner: changed from sorvell to Bryan Forbes

Could you post a test case? Also, have you tried the new DataGrid? in trunk? This may solve some of your issues.

comment:3 Changed 11 years ago by Bryan Forbes

Resolution: fixed
Status: newclosed

(In [14544]) fixes #6569 !strict

  • Use the defaultValue of a cell if the formatter doesn't return.

comment:4 Changed 11 years ago by Bryan Forbes

#1 is no longer an issue with trunk. Fixed #2.

Note: See TracTickets for help on using tickets.