Ticket #3060: dojox.wireml_20070518.patch

File dojox.wireml_20070518.patch, 55.7 kB (added by jaredj, 20 months ago)

Initial cut of wire ml plus unit tests contained within the module.

  • wireml/Transfer.js

     
     1dojo.provide("dojox.wireml.Transfer"); 
     2dojo.provide("dojox.wireml.ChildWire"); 
     3dojo.provide("dojox.wireml.ColumnWire"); 
     4dojo.provide("dojox.wireml.NodeWire"); 
     5dojo.provide("dojox.wireml.SegmentWire"); 
     6 
     7dojo.require("dijit.base.Widget"); 
     8dojo.require("dijit.base.Container"); 
     9dojo.require("dojox.wire.common"); 
     10dojo.require("dojox.wireml.Action"); 
     11 
     12dojo.declare("dojox.wireml.Transfer", 
     13        dojox.wireml.Action, { 
     14        //      summary: 
     15        //              A widget to transfer values through source and target Wires 
     16        //      description: 
     17        //              This widget represents a controller task to transfer a value from 
     18        //              a source to a target, through a source and a target Wires, when 
     19        //              an event (a function) or a topic is issued. 
     20        //              If this widget has child ChildWire widgets, their _addWire() 
     21        //              methods are called to add Wire arguments to a source or a target 
     22        //              Wire. 
     23        //      source: 
     24        //              A source object and/or property 
     25        //      sourceStore: 
     26        //              A data store for a source data item 
     27        //      sourceAttribute: 
     28        //              An attribute of a source data item 
     29        //      sourcePath: 
     30        //              A simplified XPath to a source property of an XML element 
     31        //      type: 
     32        //              A type of the value to be transferred 
     33        //      converter: 
     34        //              A class name of a converter for the value to be transferred 
     35        //      target: 
     36        //              A target object and/or property 
     37        //      targetStore: 
     38        //              A data store for a target data item 
     39        //      targetAttribute: 
     40        //              An attribute of a target data item 
     41        //      targetPath: 
     42        //              A simplified XPath to a target property of an XML element 
     43        source: "", 
     44        sourceStore: "", 
     45        sourceAttribute: "", 
     46        sourcePath: "", 
     47        type: "", 
     48        converter: "", 
     49        delimiter: "", 
     50        target: "", 
     51        targetStore: "", 
     52        targetAttribute: "", 
     53        targetPath: "", 
     54 
     55        _run: function(){ 
     56                //      summary: 
     57                //              Transfer a value from a source to a target 
     58                //      description: 
     59                //              First, Wires for a source and a target are created from attributes. 
     60                //              Then, a value is obtained by getValue() of the source Wire is set 
     61                //              by setValue() of the target Wire. 
     62                //              The arguments to this method is passed to getValue() and setValue() 
     63                //              of Wires, so that they can be used to identify the root objects off 
     64                //              the arguments. 
     65                var sourceWire = this._getWire("source"); 
     66                var targetWire = this._getWire("target"); 
     67                dojox.wire.transfer(sourceWire, targetWire, arguments); 
     68        }, 
     69 
     70        _getWire: function(/*String*/which){ 
     71                //      summary: 
     72                //              Build Wire arguments from attributes 
     73                //      description: 
     74                //              Arguments object for a source or a target Wire, specified by 
     75                //              'which' argument, are build from corresponding attributes, 
     76                //              including '*Store' (for 'dataStore'), '*Attribute' 
     77                //              (for 'attribute), '*Path' (for 'path'), 'type' and 'converter'. 
     78                //              'source' or 'target' attribute is parsed as: 
     79                //                      "object_id.property_name[.sub_property_name...]" 
     80                //              If 'source' or 'target' starts with "arguments", 'object' 
     81                //              argument for a Wire is set to null, so that the root object is 
     82                //              given as an event or topic arguments. 
     83                //              If this widget has child ChildWire widgets with a corresponding 
     84                //              'which' attribute, their _addWire() methods are called to add 
     85                //              additional Wire arguments and nested Wire is created, 
     86                //              specifying the Wire defined by this widget to 'object' argument. 
     87                //      which: 
     88                //              Which Wire arguments to build, "source" or "target" 
     89                //      returns: 
     90                //              Wire arguments object 
     91                var args = undefined; 
     92                if(which == "source"){ 
     93                        args = { 
     94                                object: this.source, 
     95                                dataStore: this.sourceStore, 
     96                                attribute: this.sourceAttribute, 
     97                                path: this.sourcePath, 
     98                                type: this.type, 
     99                                converter: this.converter 
     100                        }; 
     101                }else{ // "target" 
     102                        args = { 
     103                                object: this.target, 
     104                                dataStore: this.targetStore, 
     105                                attribute: this.targetAttribute, 
     106                                path: this.targetPath 
     107                        }; 
     108                } 
     109                if(args.object){ 
     110                        if(args.object.length >= 9 && args.object.substring(0, 9) == "arguments"){ 
     111                                args.property = args.object.substring(9); 
     112                                args.object = null; 
     113                        }else{ 
     114                                var i = args.object.indexOf('.'); 
     115                                if(i < 0){ 
     116                                        args.object = dojox.wireml._getValue(args.object); 
     117                                }else{ 
     118                                        args.property = args.object.substring(i + 1); 
     119                                        args.object = dojox.wireml._getValue(args.object.substring(0, i)); 
     120                                } 
     121                        } 
     122                } 
     123                if(args.dataStore){ 
     124                        args.dataStore = dojox.wireml._getValue(args.dataStore); 
     125                } 
     126                var childArgs = undefined; 
     127                var children = this.getChildren(); 
     128                for(var i in children){ 
     129                        var child = children[i]; 
     130                        if(child instanceof dojox.wireml.ChildWire && child.which == which){ 
     131                                if(!childArgs){ 
     132                                        childArgs = {}; 
     133                                } 
     134                                child._addWire(this, childArgs); 
     135                        } 
     136                } 
     137                if(childArgs){ // make nested Wires 
     138                        childArgs.object = dojox.wire.create(args); 
     139                        childArgs.dataStore = args.dataStore; 
     140                        args = childArgs; 
     141                } 
     142                return args; //Object 
     143        } 
     144}); 
     145 
     146dojo.declare("dojox.wireml.ChildWire", 
     147        dijit.base.Widget, { 
     148        //      summary: 
     149        //              A widget to add a child wire 
     150        //      description: 
     151        //              Attributes of this widget are used to add a child Wire to 
     152        //              a composite Wire of the parent Transfer widget. 
     153        //      which: 
     154        //              Which Wire to add a child Wire, "source" or "target", default to 
     155        //              "source" 
     156        //      object: 
     157        //              A root object for the value 
     158        //      property: 
     159        //              A property for the value 
     160        //      type: 
     161        //              A type of the value 
     162        //      converter: 
     163        //              A class name of a converter for the value 
     164        //      attribute: 
     165        //              A data item attribute for the value 
     166        //      path: 
     167        //              A simplified XPath for the value 
     168        //      name: 
     169        //              A composite property name 
     170        which: "source", 
     171        object: "", 
     172        property: "", 
     173        type: "", 
     174        converter: "", 
     175        attribute: "", 
     176        path: "", 
     177        name: "", 
     178 
     179        _addWire: function(/*Transfer*/parent, /*Object*/args){ 
     180                //      summary: 
     181                //              Add a child Wire to Wire arguments 
     182                //      description: 
     183                //              If 'name' attribute is specified, a child Wire is added as 
     184                //              the named property of 'children' object of 'args'. 
     185                //              Otherwise, a child Wire is added to 'children' array of 'args'. 
     186                //      parent: 
     187                //              A parent Transfer widget 
     188                //      args: 
     189                //              Wire arguments 
     190                if(this.name){ // object 
     191                        if(!args.children){ 
     192                                args.children = {}; 
     193                        } 
     194                        args.children[this.name] = this._getWire(parent); 
     195                }else{ // array 
     196                        if(!args.children){ 
     197                                args.children = []; 
     198                        } 
     199                        args.children.push(this._getWire(parent)); 
     200                } 
     201        }, 
     202 
     203        _getWire: function(/*Transfer*/parent){ 
     204                //      summary: 
     205                //              Build child Wire arguments from attributes 
     206                //      description: 
     207                //              Arguments object for a child Wire are build from attributes, 
     208                //              including 'object', 'property', 'type', 'converter', 
     209                //              'attribute' and 'path'. 
     210                //      parent: 
     211                //              A parent Transfer widget 
     212                //      returns: 
     213                //              Wire arguments object 
     214                return { 
     215                        object: (this.object ? dojox.wireml._getValue(this.object) : undefined), 
     216                        property: this.property, 
     217                        type: this.type, 
     218                        converter: this.converter, 
     219                        attribute: this.attribute, 
     220                        path: this.path 
     221                }; //Object 
     222        } 
     223}); 
     224 
     225dojo.declare("dojox.wireml.ColumnWire", 
     226        dojox.wireml.ChildWire, { 
     227        //      summary: 
     228        //              A widget to add a column wire 
     229        //      description: 
     230        //              Attributes of this widget are used to add a column Wire to 
     231        //              a TableAdapter of the parent Transfer widget. 
     232        //      column: 
     233        //              A column name 
     234        column: "", 
     235 
     236        _addWire: function(/*Transfer*/parent, /*Object*/args){ 
     237                //      summary: 
     238                //              Add a column Wire to Wire arguments 
     239                //      description: 
     240                //              If 'column' attribute is specified, a column Wire is added as 
     241                //              the named property of 'columns' object of 'args'. 
     242                //              Otherwise, a column Wire is added to 'columns' array of 'args'. 
     243                //      parent: 
     244                //              A parent Transfer widget 
     245                //      args: 
     246                //              Wire arguments 
     247                if(this.column){ // object 
     248                        if(!args.columns){ 
     249                                args.columns = {}; 
     250                        } 
     251                        args.columns[this.column] = this._getWire(parent); 
     252                }else{ // array 
     253                        if(!args.columns){ 
     254                                args.columns = []; 
     255                        } 
     256                        args.columns.push(this._getWire(parent)); 
     257                } 
     258        } 
     259}); 
     260 
     261dojo.declare("dojox.wireml.NodeWire", 
     262        [dojox.wireml.ChildWire, dijit.base.Container], { 
     263        //      summary: 
     264        //              A widget to add node wires 
     265        //      description: 
     266        //              Attributes of this widget are used to add node Wires to 
     267        //              a TreeAdapter of the parent Transfer widget. 
     268        //      titleProperty: 
     269        //              A property for the node title 
     270        //      titleAttribute: 
     271        //              A data item attribute for the node title 
     272        //      titlePath: 
     273        //              A simplified XPath for the node title 
     274        titleProperty: "", 
     275        titleAttribute: "", 
     276        titlePath: "", 
     277 
     278        _addWire: function(/*Transfer*/parent, /*Object*/args){ 
     279                //      summary: 
     280                //              Add node Wires to Wire arguments 
     281                //      description: 
     282                //              Node Wires are added to 'nodes' array of 'args'. 
     283                //      parent: 
     284                //              A parent Transfer widget 
     285                //      args: 
     286                //              Wire arguments 
     287                if(!args.nodes){ 
     288                        args.nodes = []; 
     289                } 
     290                args.nodes.push(this._getWires(parent)); 
     291        }, 
     292 
     293        _getWires: function(/*Transfer*/parent){ 
     294                //      summary: 
     295                //              Build node Wires arguments from attributes 
     296                //      description: 
     297                //              Arguments object for 'node' Wire are build from attributes, 
     298                //              including 'object', 'property', 'type', 'converter', 
     299                //              'attribute' and 'path'. 
     300                //              Arguments object for 'title' Wire are build from another set of 
     301                //              attributes, 'titleProperty', 'titleAttribute' and 'titlePath'. 
     302                //              If this widget has child NodeWire widgets, their _getWires() 
     303                //              methods are called recursively to build 'children' array of 
     304                //              'args'. 
     305                //      parent: 
     306                //              A parent Transfer widget 
     307                //      returns: 
     308                //              Wire arguments object 
     309                var args = { 
     310                        node: this._getWire(parent), 
     311                        title: { 
     312                                type: "string", 
     313                                property: this.titleProperty, 
     314                                attribute: this.titleAttribute, 
     315                                path: this.titlePath 
     316                        } 
     317                }; 
     318                var childArgs = []; 
     319                var children = this.getChildren(); 
     320                for(var i in children){ 
     321                        var child = children[i]; 
     322                        if(child instanceof dojox.wireml.NodeWire){ 
     323                                childArgs.push(child._getWires(parent)); 
     324                        } 
     325                } 
     326                if(childArgs.length > 0){ 
     327                        args.children = childArgs; 
     328                } 
     329                return args; //Object 
     330        } 
     331}); 
     332 
     333dojo.declare("dojox.wireml.SegmentWire", 
     334        dojox.wireml.ChildWire, { 
     335        //      summary: 
     336        //              A widget to add a segment wire 
     337        //      description: 
     338        //              Attributes of this widget are used to add a segment Wire to 
     339        //              a TextAdapter of the parent Transfer widget. 
     340 
     341        _addWire: function(/*Transfer*/parent, /*Object*/args){ 
     342                //      summary: 
     343                //              Add a segument Wire to Wire arguments 
     344                //      description: 
     345                //              A segment Wire is added to 'segments' array of 'args'. 
     346                //              If 'parent' has 'delimiter' attribute, it is used for 
     347                //              'delimiter' property of 'args'. 
     348                //      parent: 
     349                //              A parent Transfer widget 
     350                //      args: 
     351                //              Wire arguments 
     352                if(!args.segments){ 
     353                        args.segments = []; 
     354                } 
     355                args.segments.push(this._getWire(parent)); 
     356                if(parent.delimiter && !args.delimiter){ 
     357                        args.delimiter = parent.delimiter; 
     358                } 
     359        } 
     360}); 
  • wireml/DataStore.js

    Property changes on: wireml/Transfer.js
    ___________________________________________________________________
    Name: svn:eol-style
       + native
    
     
     1dojo.provide("dojox.wireml.DataStore"); 
     2 
     3dojo.require("dijit.base.Widget"); 
     4dojo.require("dojox.wire.common"); 
     5 
     6dojo.declare("dojox.wireml.DataStore", 
     7        dijit.base.Widget, { 
     8        //      summary: 
     9        //              A widget for a data store 
     10        //      description: 
     11        //              This widget represents a data store of 'storeClass' attribute. 
     12        //      storeClass: 
     13        //              A class name of a data store 
     14        storeClass: "", 
     15 
     16        postCreate: function(){ 
     17                //      summary: 
     18                //              Call _createStore() 
     19                //      description: 
     20                //              See _createStore(). 
     21                this.store = this._createStore(); 
     22        }, 
     23 
     24        _createStore: function(){ 
     25                //      summary: 
     26                //              Create a data store 
     27                //      desription: 
     28                //              A data store of 'storeClass' is created with arguments 
     29                //              specified with attributes. 
     30                //      returns: 
     31                //              A data store 
     32                if(!this.storeClass){ 
     33                        return null; //null 
     34                } 
     35                var storeClass = dojox.wire._getClass(this.storeClass); 
     36                if(!storeClass){ 
     37                        return null; //null 
     38                } 
     39                var args = {}; 
     40                var attributes = this.domNode.attributes; 
     41                for(var i = 0; i < attributes.length; i++){ 
     42                        var a = attributes.item(i); 
     43                        if(a.specified && !this[a.nodeName]){ 
     44                                args[a.nodeName] = a.nodeValue; 
     45                        } 
     46                } 
     47                return new storeClass(args); //Object 
     48        }, 
     49 
     50        getFeatures: function(){ 
     51                //      summary: 
     52                //              Call getFeatures() method of a data store 
     53                //      description: 
     54                //              See dojo.data.api.Read.getFeatures(). 
     55                //      returns: 
     56                //              A features object 
     57                return this.store.getFeatures(); //Object 
     58        }, 
     59 
     60        fetch: function(/*Object*/request){ 
     61                //      summary: 
     62                //              Call fetch() method of a data store 
     63                //      description: 
     64                //              See dojo.data.api.Read.fetch(). 
     65                //      request: 
     66                //              A request object 
     67                //      returns: 
     68                //              A request object 
     69                return this.store.fetch(request); //Object 
     70        }, 
     71 
     72        save: function(/*Object*/args){ 
     73                //      summary: 
     74                //              Call save() method of a data store 
     75                //      description: 
     76                //              See dojo.data.api.Write.save(). 
     77                //      args: 
     78                //              A save arguments object 
     79                this.store.save(args); 
     80        }, 
     81 
     82        newItem: function(/*Object*/args){ 
     83                //      summary: 
     84                //              Call newItem() method of a data store 
     85                //      description: 
     86                //              See dojo.data.api.Write.newItem(). 
     87                //      args: 
     88                //              A new item arguments object 
     89                //      returns: 
     90                //              A new item 
     91                return this.store.newItem(args); //Object 
     92        }, 
     93 
     94        deleteItem: function(/*Object*/item){ 
     95                //      summary: 
     96                //              Call deleteItem() method of a data store 
     97                //      description: 
     98                //              See dojo.data.api.Write.deleteItem(). 
     99                //      returns: 
     100                //              A boolean 
     101                return this.store.deleteItem(item); //Boolean 
     102        }, 
     103 
     104        revert: function(){ 
     105                //      summary: 
     106                //              Call revert() method of a data store 
     107                //      description: 
     108                //              See dojo.data.api.Write.revert(). 
     109                //      returns: 
     110                //              A boolean 
     111                return this.store.revert(); //Boolean 
     112        } 
     113}); 
  • wireml/tests/markup/Action.html

    Property changes on: wireml/DataStore.js
    ___________________________________________________________________
    Name: svn:eol-style
       + native
    
     
     1<html> 
     2<head> 
     3<title>Test Action</title> 
     4<script type="text/javascript" src="../../../../dojo/dojo.js" djConfig="isDebug: true"></script> 
     5<script type="text/javascript"> 
     6dojo.provide("dojox.wireml.tests.markup.Action"); 
     7 
     8dojo.require("dijit.util.parser"); 
     9dojo.require("doh.runner"); 
     10dojo.require("dojox.wireml.Action"); 
     11dojo.require("dojox.wireml.Transfer"); 
     12 
     13dojox.wireml.tests.markup.Action = { 
     14        transfer: function(){}, 
     15        source: {a: "A", b: "B"} 
     16}; 
     17 
     18dojo.addOnLoad(function(){ 
     19        doh.register("dojox.wireml.tests.markup.Action", [ 
     20 
     21                function test_Action_triggerEvent(t){ 
     22                        dojox.wireml.tests.markup.Action.target = {}; 
     23                        dojox.wireml.tests.markup.Action.transfer(); 
     24                        t.assertEqual(dojox.wireml.tests.markup.Action.source.a, dojox.wireml.tests.markup.Action.target.a); 
     25                        t.assertEqual(dojox.wireml.tests.markup.Action.source.b, dojox.wireml.tests.markup.Action.target.b); 
     26                }, 
     27 
     28                function test_Action_triggerTopic(t){ 
     29                        dojox.wireml.tests.markup.Action.target = {}; 
     30                        dojo.publish("transfer"); 
     31                        t.assertEqual(dojox.wireml.tests.markup.Action.source.a, dojox.wireml.tests.markup.Action.target.a); 
     32                }, 
     33 
     34                function test_ActionFilter_required(t){ 
     35                        dojox.wireml.tests.markup.Action.target = {}; 
     36                        dojo.publish("transferFilter"); 
     37                        t.assertEqual(undefined, dojox.wireml.tests.markup.Action.target.a); 
     38                        t.assertEqual("no required", dojox.wireml.tests.markup.Action.error); 
     39                        dojox.wireml.tests.markup.Action.required = true; 
     40                        dojo.publish("transferFilter"); 
     41                        t.assertEqual(dojox.wireml.tests.markup.Action.source.a, dojox.wireml.tests.markup.Action.target.a); 
     42                } 
     43 
     44        ]); 
     45        doh.run(); 
     46}); 
     47</script> 
     48</head> 
     49<body> 
     50<div dojoType="dojox.wireml.Action" 
     51        trigger="dojox.wireml.tests.markup.Action" 
     52        triggerEvent="transfer"> 
     53        <div dojoType="dojox.wireml.Transfer" 
     54                source="dojox.wireml.tests.markup.Action.source.a" 
     55                target="dojox.wireml.tests.markup.Action.target.a"></div> 
     56        <div dojoType="dojox.wireml.Transfer" 
     57                source="dojox.wireml.tests.markup.Action.source.b" 
     58                target="dojox.wireml.tests.markup.Action.target.b"></div> 
     59</div> 
     60<div dojoType="dojox.wireml.Action" 
     61        triggerTopic="transfer"> 
     62        <div dojoType="dojox.wireml.Transfer" 
     63                source="dojox.wireml.tests.markup.Action.source.a" 
     64                target="dojox.wireml.tests.markup.Action.target.a"></div> 
     65</div> 
     66<div dojoType="dojox.wireml.Action" 
     67        triggerTopic="transferFilter"> 
     68        <div dojoType="dojox.wireml.ActionFilter" 
     69                required="dojox.wireml.tests.markup.Action.required" 
     70                message="no required" 
     71                error="dojox.wireml.tests.markup.Action.error"></div> 
     72        <div dojoType="dojox.wireml.Transfer" 
     73                source="dojox.wireml.tests.markup.Action.source.a" 
     74                target="dojox.wireml.tests.markup.Action.target.a"></div> 
     75</div> 
     76</body> 
     77</html> 
  • wireml/tests/markup/DataStore.xml

    Property changes on: wireml/tests/markup/Action.html
    ___________________________________________________________________
    Name: svn:eol-style
       + native
    
     
     1<?xml version="1.0" encoding="ISO-8859-1"?> 
     2<dataStore> 
     3        <item> 
     4                <x>X1</x> 
     5                <y>Y1</y> 
     6                <z>Z1</z> 
     7        </item> 
     8        <item> 
     9                <x>X2</x> 
     10                <y>Y2</y> 
     11                <z>Z2</z> 
     12        </item> 
     13        <item> 
     14                <x>X3</x> 
     15                <y>Y3</y> 
     16                <z>Z3</z> 
     17        </item> 
     18</dataStore> 
  • wireml/tests/markup/Transfer.html

    Property changes on: wireml/tests/markup/DataStore.xml
    ___________________________________________________________________
    Name: svn:eol-style
       + native
    
     
     1<html> 
     2<head> 
     3<title>Test Transfer</title> 
     4<script type="text/javascript" src="../../../../dojo/dojo.js" djConfig="isDebug: true"></script> 
     5<script type="text/javascript"> 
     6dojo.provide("dojox.wireml.tests.markup.Transfer"); 
     7 
     8dojo.require("dijit.util.parser"); 
     9dojo.require("doh.runner"); 
     10dojo.require("dojox.data.dom"); 
     11dojo.require("dojox.data.XmlStore"); 
     12dojo.require("dojox.wireml.Action"); 
     13dojo.require("dojox.wireml.Transfer"); 
     14 
     15dojox.wireml.tests.markup.Transfer = { 
     16        source: {a: "A", b: "B", c: [ 
     17                {d: "D1", e: "E1"}, 
     18                {d: "D2", e: "E2"} 
     19        ]} 
     20}; 
     21 
     22dojo.addOnLoad(function(){ 
     23        doh.register("dojox.wireml.tests.markup.Transfer", [ 
     24 
     25                function test_Transfer_attribute(t){ 
     26                        dojox.wireml.tests.markup.Transfer.store = new dojox.data.XmlStore(); 
     27                        dojox.wireml.tests.markup.Transfer.item = dojox.wireml.tests.markup.Transfer.store.newItem({tagName: "x"}); 
     28                        dojox.wireml.tests.markup.Transfer.target = {}; 
     29                        dojo.publish("transferData"); 
     30                        t.assertEqual(dojox.wireml.tests.markup.Transfer.source.a, dojox.wireml.tests.markup.Transfer.target.a); 
     31                }, 
     32 
     33                function test_Transfer_path(t){ 
     34                        dojox.wireml.tests.markup.Transfer.element = dojox.data.dom.createDocument().createElement("x"); 
     35                        dojox.wireml.tests.markup.Transfer.target = {}; 
     36                        dojo.publish("transferXml"); 
     37                        t.assertEqual(dojox.wireml.tests.markup.Transfer.source.a, dojox.wireml.tests.markup.Transfer.target.a); 
     38                }, 
     39 
     40                function test_ChildWire(t){ 
     41                        dojox.wireml.tests.markup.Transfer.target = {}; 
     42                        dojo.publish("transferComposite"); 
     43                        t.assertEqual(dojox.wireml.tests.markup.Transfer.source.a, dojox.wireml.tests.markup.Transfer.target.c); 
     44                        t.assertEqual(dojox.wireml.tests.markup.Transfer.source.b, dojox.wireml.tests.markup.Transfer.target.d); 
     45                }, 
     46 
     47                function test_ColumnWire(t){ 
     48                        dojox.wireml.tests.markup.Transfer.target = {}; 
     49                        dojo.publish("transferTable"); 
     50                        t.assertEqual(dojox.wireml.tests.markup.Transfer.source.c[0].d, dojox.wireml.tests.markup.Transfer.target.a[0].b); 
     51                        t.assertEqual(dojox.wireml.tests.markup.Transfer.source.c[1].e, dojox.wireml.tests.markup.Transfer.target.a[1].c); 
     52                }, 
     53 
     54                function test_NodeWire(t){ 
     55                        dojox.wireml.tests.markup.Transfer.target = {}; 
     56                        dojo.publish("transferTree"); 
     57                        t.assertEqual(dojox.wireml.tests.markup.Transfer.source.c[0].d, dojox.wireml.tests.markup.Transfer.target.a[0].title); 
     58                        t.assertEqual(dojox.wireml.tests.markup.Transfer.source.c[1].e, dojox.wireml.tests.markup.Transfer.target.a[1].children[0].title); 
     59                }, 
     60 
     61                function test_SegimentWire(t){ 
     62