| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
<html> |
| 11 |
<head> |
| 12 |
<title>Sample Composite (Child) Wire usage.</title> |
| 13 |
<style type="text/css"> |
| 14 |
@import "../../../../dijit/themes/tundra/tundra.css"; |
| 15 |
@import "../../../../dojo/resources/dojo.css"; |
| 16 |
@import "../../../../dijit/tests/css/dijitTests.css"; |
| 17 |
</style> |
| 18 |
|
| 19 |
<script type="text/javascript" src="../../../../dojo/dojo.js" data-dojo-config="isDebug: true, parseOnLoad: true"></script> |
| 20 |
<script type="text/javascript"> |
| 21 |
dojo.require("dojo.parser"); |
| 22 |
dojo.require("dijit.form.Button"); |
| 23 |
dojo.require("dojo.data.ItemFileReadStore"); |
| 24 |
dojo.require("dojox.wire.ml.Invocation"); |
| 25 |
dojo.require("dojox.wire.ml.DataStore"); |
| 26 |
dojo.require("dojox.wire.ml.Transfer"); |
| 27 |
dojo.require("dojox.wire"); |
| 28 |
dojo.require("dojox.wire.demos.WidgetRepeater"); |
| 29 |
|
| 30 |
dataHolder = { |
| 31 |
request: {onItem: function(item){}}, |
| 32 |
result: null |
| 33 |
}; |
| 34 |
</script> |
| 35 |
</head> |
| 36 |
<body class="tundra"> |
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
<div dojoType="dojox.wire.ml.Invocation" |
| 42 |
triggerEvent="onLoad" |
| 43 |
object="DataStore1" method="fetch" parameters="dataHolder.request"> |
| 44 |
</div> |
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
<div dojoType="dojo.data.ItemFileReadStore" |
| 50 |
data-dojo-id="DataStore1" |
| 51 |
url="countries.json"> |
| 52 |
</div> |
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
<div dojoType="dojox.wire.demos.WidgetRepeater" |
| 59 |
widget="dijit.form.Button" data-dojo-id="r1"> |
| 60 |
</div> |
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
<div dojoType="dojox.wire.ml.Action" |
| 69 |
trigger="dataHolder.request" triggerEvent="onItem"> |
| 70 |
<div dojoType="dojox.wire.ml.Transfer" |
| 71 |
source="arguments[0]" sourceStore="DataStore1" |
| 72 |
target="dataHolder.result"> |
| 73 |
<div dojoType="dojox.wire.ml.ChildWire" name="label" attribute="name"></div> |
| 74 |
</div> |
| 75 |
<div dojoType="dojox.wire.ml.Invocation" object="r1" method="createNew" parameters='dataHolder.result'></div> |
| 76 |
</div> |
| 77 |
</body> |
| 78 |
</html> |