1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- if(!dojo._hasResource["dojox.wire.TableAdapter"]){
- dojo._hasResource["dojox.wire.TableAdapter"] = true;
- 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;
- }
- });
- }
|