| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
<html> |
| 9 |
<head> |
| 10 |
<title>Sample Action Chaining</title> |
| 11 |
<style type="text/css"> |
| 12 |
|
| 13 |
@import "../../../../dijit/themes/tundra/tundra.css"; |
| 14 |
@import "../../../../dojo/resources/dojo.css"; |
| 15 |
@import "../../../../dijit/tests/css/dijitTests.css"; |
| 16 |
@import "../TableContainer.css"; |
| 17 |
|
| 18 |
.splitView { |
| 19 |
width: 90%; |
| 20 |
height: 90%; |
| 21 |
border: 1px solid #bfbfbf; |
| 22 |
border-collapse: separate; |
| 23 |
} |
| 24 |
</style> |
| 25 |
|
| 26 |
<script type="text/javascript" src="../../../../dojo/dojo.js" data-dojo-config="isDebug: true, parseOnLoad: true"></script> |
| 27 |
<script type="text/javascript"> |
| 28 |
dojo.require("dojo.parser"); |
| 29 |
dojo.require("dojox.wire"); |
| 30 |
dojo.require("dojox.wire.ml.Invocation"); |
| 31 |
dojo.require("dojox.wire.ml.DataStore"); |
| 32 |
dojo.require("dojox.wire.ml.Transfer"); |
| 33 |
dojo.require("dojox.wire.ml.Data"); |
| 34 |
dojo.require("dijit.form.TextBox"); |
| 35 |
</script> |
| 36 |
</head> |
| 37 |
|
| 38 |
<body class="tundra"> |
| 39 |
|
| 40 |
|
| 41 |
<font size="3"><b>Demo of Chaining Actions:</b></font><br/><br/> |
| 42 |
This demo shows how you can chain actions together to fire in a sequence. |
| 43 |
Such as the completion of setting one value on a widget triggers the setting of another value on the widget |
| 44 |
<br/> |
| 45 |
<br/> |
| 46 |
<table> |
| 47 |
<tr> |
| 48 |
<td> |
| 49 |
<div dojoType="dijit.form.TextBox" id="inputField" value="" size="50" intermediateChanges="true"></div> |
| 50 |
</td> |
| 51 |
</tr> |
| 52 |
<tr> |
| 53 |
<td> |
| 54 |
<div dojoType="dijit.form.TextBox" id="targetField1" value="" disabled="true" size="50"></div> |
| 55 |
</td> |
| 56 |
</tr> |
| 57 |
<tr> |
| 58 |
<td> |
| 59 |
<div dojoType="dijit.form.TextBox" id="targetField2" value="" disabled="true" size="50"></div> |
| 60 |
</td> |
| 61 |
</tr> |
| 62 |
</table> |
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
<div dojoType="dojox.wire.ml.Data" |
| 73 |
id="data"> |
| 74 |
<div dojoType="dojox.wire.ml.DataProperty" |
| 75 |
name="tempData" |
| 76 |
value=""> |
| 77 |
</div> |
| 78 |
<div dojoType="dojox.wire.ml.DataProperty" |
| 79 |
name="value" |
| 80 |
value="value"> |
| 81 |
</div> |
| 82 |
</div> |
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
<div dojoType="dojox.wire.ml.Action" |
| 89 |
id="action1" |
| 90 |
trigger="inputField" |
| 91 |
triggerEvent="onChange"> |
| 92 |
<div dojoType="dojox.wire.ml.Transfer" source="inputField.value" target="data.tempData"></div> |
| 93 |
<div dojoType="dojox.wire.ml.Invocation" id="targetCopy" object="targetField1" method="set" parameters="data.value, data.tempData"></div> |
| 94 |
</div> |
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
<div dojoType="dojox.wire.ml.Action" |
| 100 |
id="action2" |
| 101 |
trigger="targetCopy" |
| 102 |
triggerEvent="onComplete"> |
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
<div dojoType="dojox.wire.ml.Transfer" source="targetField1.value" target="targetField2.value"></div> |
| 110 |
</div> |
| 111 |
</body> |
| 112 |
</html> |