Opened 9 years ago

Closed 8 years ago

#11412 closed defect (wontfix)

grid.loadingMessage is removed even though items have not been loaded yet

Reported by: Simon Speich Owned by: Bryan Forbes
Priority: high Milestone: tbd
Component: DojoX Grid Version: 1.5.0b2
Keywords: Cc:
Blocked By: Blocking:

Description

When using the grid with a JsonRestStore? the loadingMessage is removed before the items are actually loaded. This happens only when using JsonReferencing? in the data items, because grid._onFetchBegin() only looks at the size=item.length when deciding to remove the loadingMessage and not if the items are actually loaded. Therefore only checking the number of items is not enough when deciding to remove the loadingMessage. _onFetchBegin should use isItemLoaded for each item instead, because an item might only only contain references (which will be loaded later).

_fetch: function(start, isRender){
	...
	// should check if items are loaded an not only check items.length, because they might only contain references which will be loaded later, but the loadingMessage is removed!
	this._onFetchBegin(items.length, req);
	...
}

_onFetchBegin: function(size, req){
	...
	if(!size){
		this.views.render();
		this._resize();
		this.showMessage(this.noDataMessage);
		this.focus.initFocusView();
	}else{
		this.showMessage();
	}

},

Change History (3)

comment:1 Changed 9 years ago by Adam Peller

Component: GeneralDojoX Grid
Owner: changed from anonymous to bryanforbes

comment:2 Changed 9 years ago by bill

Owner: changed from bryanforbes to Bryan Forbes

comment:3 Changed 8 years ago by Bryan Forbes

Resolution: wontfix
Status: newclosed

Such an expensive operation (looping through all items and calling !isItemLoaded) cannot be done for every grid and store combo.

Note: See TracTickets for help on using tickets.