[Dojo-checkins] kzyp - r15326 - in dojox/trunk/data: . tests/stores
dojo-checkins-admin at dojotoolkit.org
dojo-checkins-admin at dojotoolkit.org
Thu Sep 25 01:04:47 UTC 2008
Author: kzyp
Date: Wed Sep 24 18:04:44 2008
New Revision: 15326
Modified:
dojox/trunk/data/ServiceStore.js
dojox/trunk/data/tests/stores/ServiceStore.js
Log:
fixes #7725
Modified: dojox/trunk/data/ServiceStore.js
==============================================================================
--- dojox/trunk/data/ServiceStore.js (original)
+++ dojox/trunk/data/ServiceStore.js Wed Sep 24 18:04:44 2008
@@ -118,7 +118,7 @@
// property to look up value for
var val = this.getValue(item,property);
- return val instanceof Array ? val : [val];
+ return val instanceof Array ? val : val === undefined ? [] : [val];
},
getAttributes: function(item){
Modified: dojox/trunk/data/tests/stores/ServiceStore.js
==============================================================================
--- dojox/trunk/data/tests/stores/ServiceStore.js (original)
+++ dojox/trunk/data/tests/stores/ServiceStore.js Wed Sep 24 18:04:44 2008
@@ -38,7 +38,7 @@
// summary:
// Simple test of a basic fetch on ServiceStore of a single item.
var d = new doh.Deferred();
- jsonStore.fetchItemByIdentity({identity:0,
+ jsonStore.fetchItemByIdentity({identity:1,
onItem: function(item, request){
t.is("Object 1", item.name);
t.is("Object 1",jsonStore.getValue(item,"name"));
@@ -48,7 +48,7 @@
t.t(jsonStore.isItemLoaded(item));
t.t(jsonStore.containsValue(item,"name","Object 1"));
t.f(jsonStore.containsValue(item,"name","Something Else"));
- t.is(jsonStore.getIdentity(item),0);
+ t.is(jsonStore.getIdentity(item),1);
t.t(dojo.indexOf(jsonStore.getAttributes(item),"name")>-1);
t.is("default",jsonStore.getValue(item,"nothing","default"));
d.callback(true);
More information about the Dojo-checkins
mailing list