12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- define("dojox/wire/TableAdapter", ["dijit","dojo","dojox","dojo/require!dojox/wire/CompositeWire"], function(dijit,dojo,dojox){
- dojo.provide("dojox.wire.TableAdapter");
- dojo.require("dojox.wire.CompositeWire");
- dojo.declare("dojox.wire.TableAdapter", dojox.wire.CompositeWire, {
-
-
-
-
-
-
-
-
-
-
-
-
-
- _wireClass: "dojox.wire.TableAdapter",
-
- constructor: function(/*Object*/args){
-
-
-
-
-
-
-
-
-
-
- this._initializeChildren(this.columns);
- },
- _getValue: function(/*Array*/object){
-
-
-
-
-
-
-
-
-
-
-
- if(!object || !this.columns){
- return object;
- }
- var array = object;
- if(!dojo.isArray(array)){
- array = [array];
- }
- var rows = [];
- for(var i in array){
- var row = this._getRow(array[i]);
- rows.push(row);
- }
- return rows;
- },
- _setValue: function(/*Array*/object, /*Array*/value){
-
-
- throw new Error("Unsupported API: " + this._wireClass + "._setValue");
- },
- _getRow: function(/*Object||Array*/object){
-
-
-
-
-
-
-
- var row = (dojo.isArray(this.columns) ? [] : {});
- for(var c in this.columns){
- row[c] = this.columns[c].getValue(object);
- }
- return row;
- }
- });
- });
|