Project

General

Profile

Statistics
| Revision:

root / trunk / web / dojo / dojox / wire / TableAdapter.js @ 12

History | View | Annotate | Download (988 Bytes)

1 9 andrej.cim
/*
2
        Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
3
        Available via Academic Free License >= 2.1 OR the modified BSD license.
4
        see: http://dojotoolkit.org/license for details
5
*/
6
7
8
if(!dojo._hasResource["dojox.wire.TableAdapter"]){
9
dojo._hasResource["dojox.wire.TableAdapter"]=true;
10
dojo.provide("dojox.wire.TableAdapter");
11
dojo.require("dojox.wire.CompositeWire");
12
dojo.declare("dojox.wire.TableAdapter",dojox.wire.CompositeWire,{_wireClass:"dojox.wire.TableAdapter",constructor:function(_1){
13
this._initializeChildren(this.columns);
14
},_getValue:function(_2){
15
if(!_2||!this.columns){
16
return _2;
17
}
18
var _3=_2;
19
if(!dojo.isArray(_3)){
20
_3=[_3];
21
}
22
var _4=[];
23
for(var i in _3){
24
var _5=this._getRow(_3[i]);
25
_4.push(_5);
26
}
27
return _4;
28
},_setValue:function(_6,_7){
29
throw new Error("Unsupported API: "+this._wireClass+"._setValue");
30
},_getRow:function(_8){
31
var _9=(dojo.isArray(this.columns)?[]:{});
32
for(var c in this.columns){
33
_9[c]=this.columns[c].getValue(_8);
34
}
35
return _9;
36
}});
37
}