123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- define("dojox/wire/ml/DataStore", ["dijit","dojo","dojox","dojo/require!dijit/_Widget,dojox/wire/_base"], function(dijit,dojo,dojox){
- dojo.provide("dojox.wire.ml.DataStore");
- dojo.require("dijit._Widget");
- dojo.require("dojox.wire._base");
- dojo.declare("dojox.wire.ml.DataStore", dijit._Widget, {
-
-
-
-
-
-
- storeClass: "",
- postCreate: function(){
-
-
-
-
- this.store = this._createStore();
- },
- _createStore: function(){
-
-
-
-
-
-
-
- if(!this.storeClass){
- return null;
- }
- var storeClass = dojox.wire._getClass(this.storeClass);
- if(!storeClass){
- return null;
- }
- var args = {};
- var attributes = this.domNode.attributes;
- for(var i = 0; i < attributes.length; i++){
- var a = attributes.item(i);
- if(a.specified && !this[a.nodeName]){
- args[a.nodeName] = a.nodeValue;
- }
- }
- return new storeClass(args);
- },
- getFeatures: function(){
-
-
-
-
-
-
- return this.store.getFeatures();
- },
- fetch: function(/*Object*/request){
-
-
-
-
-
-
-
-
- return this.store.fetch(request);
- },
- save: function(/*Object*/args){
-
-
-
-
-
-
- this.store.save(args);
- },
- newItem: function(/*Object*/args){
-
-
-
-
-
-
-
-
- return this.store.newItem(args);
- },
- deleteItem: function(/*Object*/item){
-
-
-
-
-
-
- return this.store.deleteItem(item);
- },
- revert: function(){
-
-
-
-
-
-
- return this.store.revert();
- }
- });
- });
|