Opened 9 years ago

Closed 6 years ago

#11410 closed defect (wontfix)

[regression] getValues produces error: args.item is undefined

Reported by: Simon Speich Owned by: Kris Zyp
Priority: high Milestone: tbd
Component: DojoX Data Version: 1.5.0rc1
Keywords: regression, JsonRestStore, ServiceStore, Version 1.5.0.rc2 Cc:
Blocked By: Blocking:

Description

In dojo 1.4.3 ServiceStore?.getValues(item, property) returned an empty array if item was not loaded yet, e.g.:

var val = this.getValue(item,property);
return val instanceof Array ? val : val === undefined ? [] : [val];

but now getValues() fails with the error args.item is undefined since it tries to load the item e.g.:

var val = this.getValue(item,property);
if(val instanceof Array){
	return val;
}
if(!this.isItemLoaded(val)){
	dojox.rpc._sync = true;
	val = this.loadItem({item:val});
}
return val instanceof Array ? val : val === undefined ? [] : [val];

but {item:val} is undefined since val === undefined and so loadItem(args) fails, e.g.:

var item;
if(args.item._loadObject){
	...
});
}else if(args.onItem){
	...
}
return item;

Note: 1.5.0.rc2 was not in list yet

Change History (5)

comment:1 Changed 9 years ago by Simon Speich

Change line 220 in ServiceStore?.js to:

if(args.item && args.item._loadObject){}

would fix the problem.

comment:2 Changed 9 years ago by bill

Component: GeneralDojoX Data
Owner: changed from anonymous to kriszyp
Summary: getValues produces error: args.item is undefined[regression] getValues produces error: args.item is undefined

comment:3 Changed 9 years ago by Adam Peller

Owner: changed from kriszyp to Kris Zyp

comment:4 Changed 8 years ago by Millennium

Same problem when "val === null".

Trying todo a getvalues on a field which is null (returned by server)

comment:5 Changed 6 years ago by Colin Snover

Resolution: wontfix
Status: newclosed

dojox/data is abandoned. Some dojox/data stores have been upgraded to use the Dojo Store API and can be found at https://github.com/kfranqueiro/dojo-smore.

Note: See TracTickets for help on using tickets.