| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
<html> |
| 10 |
<head> |
| 11 |
<title>Sample Topic Wiring</title> |
| 12 |
<style type="text/css"> |
| 13 |
|
| 14 |
@import "../../../../dijit/themes/tundra/tundra.css"; |
| 15 |
@import "../../../../dojo/resources/dojo.css"; |
| 16 |
@import "../../../../dijit/tests/css/dijitTests.css"; |
| 17 |
@import "../TableContainer.css"; |
| 18 |
|
| 19 |
.splitView { |
| 20 |
width: 90%; |
| 21 |
height: 90%; |
| 22 |
border: 1px solid #bfbfbf; |
| 23 |
border-collapse: separate; |
| 24 |
} |
| 25 |
</style> |
| 26 |
|
| 27 |
<script type="text/javascript" src="../../../../dojo/dojo.js" data-dojo-config="isDebug: true, parseOnLoad: true"></script> |
| 28 |
<script type="text/javascript"> |
| 29 |
dojo.require("dojo.parser"); |
| 30 |
dojo.require("dojox.wire"); |
| 31 |
dojo.require("dojox.wire.ml.Invocation"); |
| 32 |
dojo.require("dojox.wire.ml.DataStore"); |
| 33 |
dojo.require("dojox.wire.ml.Transfer"); |
| 34 |
dojo.require("dojox.wire.ml.Data"); |
| 35 |
|
| 36 |
dojo.require("dijit.form.TextBox"); |
| 37 |
</script> |
| 38 |
</head> |
| 39 |
|
| 40 |
<body class="tundra"> |
| 41 |
|
| 42 |
|
| 43 |
<font size="3"><b>Demo of Topic Wiring</b></font><br/><br/> |
| 44 |
This demo shows how you can wire events to publish to a topic as well as receive topic events |
| 45 |
<br/> |
| 46 |
<br/> |
| 47 |
<table> |
| 48 |
<tr> |
| 49 |
<td> |
| 50 |
<div dojoType="dijit.form.TextBox" data-dojo-id="inputField" value="" size="50" intermediateChanges="true"></div> |
| 51 |
</td> |
| 52 |
</tr> |
| 53 |
<tr> |
| 54 |
<td> |
| 55 |
<div dojoType="dijit.form.TextBox" data-dojo-id="targetField1" value="" disabled="true" size="50"></div> |
| 56 |
</td> |
| 57 |
</tr> |
| 58 |
</table> |
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
<div dojoType="dojox.wire.ml.Action" |
| 67 |
id="action1" |
| 68 |
trigger="inputField" |
| 69 |
triggerEvent="onChange"> |
| 70 |
<div dojoType="dojox.wire.ml.Invocation" topic="sampleTopic" parameters="inputField.value"></div> |
| 71 |
</div> |
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
<div dojoType="dojox.wire.ml.Action" |
| 79 |
id="action2" |
| 80 |
triggerTopic="sampleTopic"> |
| 81 |
<div dojoType="dojox.wire.ml.Transfer" target="targetField1.value" source="arguments[0]"></div> |
| 82 |
</div> |
| 83 |
</body> |
| 84 |
</html> |