dojo.addOnLoad(function(){
   dataStore.setValueAlt = function (item, node, attribute, newValueOrValues, callOnSet) { 
      this._assert(!this._saveInProgress);
      this._assertIsItem(item);
      this._assert(dojo.isString(attribute));
      this._assert(typeof newValueOrValues !== "undefined");
      var identifierAttribute = this._getIdentifierAttribute();
      if (attribute == identifierAttribute) {
         throw new Error("ItemFileWriteStore does not have support for changing the value of an item's identifier.");
      }
      var oldValueOrValues = this._getValueOrValues(item, attribute);
      var identity = this.getIdentity(item);
      if (!this._pending._modifiedItems[identity]) {
         var copyOfItemState = {};
         for (var key in item) {
            if(
               key === this._storeRefPropName || 
               key === this._itemNumPropName  || 
               key === this._rootItemPropName)
            {
               copyOfItemState[key] = item[key];
            } else {
               var valueArray = item[key];
               var copyOfValueArray = [];
               for (var i = 0; i < valueArray.length; ++i) {
                  copyOfValueArray.push(valueArray[i]);
               }
               copyOfItemState[key] = copyOfValueArray;
            }
         }
         this._pending._modifiedItems[identity] = copyOfItemState;
      }
      var success = false;
      if (dojo.isArray(newValueOrValues) && newValueOrValues.length === 0) {
         success = delete item[attribute];
         newValueOrValues = undefined;
      } else {
         var newValueArray = [];
         if (dojo.isArray(newValueOrValues)) {
            var newValues = newValueOrValues;
            for (var j = 0; j < newValues.length; ++j) {
               newValueArray.push(newValues[j]);
            }
         } else {
            var newValue = newValueOrValues;
            newValueArray.push(newValue);
         }
         item[attribute] = newValueArray;
         success = true;
      }
      if (callOnSet) {
         show = true;
         this.onSetAlt(item, node, attribute, oldValueOrValues, newValueOrValues);
         show = false;
      }
      return success;
   }
   
   dataStore.onSetAlt = function (item, node, attribute, oldValue, newValue) {
      var ap = Array.prototype, 
      c = arguments.callee, 
      ls = c._listeners, 
      t = c.target;
      var r = t && t.apply(this, arguments);
      node._updateItemClasses(item);
   }
});
