aboutsummaryrefslogtreecommitdiff
path: root/includes/js/dojox/wire/tests/markup/Invocation.html
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-13 09:49:11 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-13 09:49:11 +0000
commite44a7e37b6c7b5961adaffc62b9042b8d442938e (patch)
tree95b67c356e93163467db2451f2b8cce84ed5d582 /includes/js/dojox/wire/tests/markup/Invocation.html
parenta62b9742ee5e28bcec6872d88f50f25b820914f6 (diff)
downloadsemanticscuttle-e44a7e37b6c7b5961adaffc62b9042b8d442938e.tar.gz
semanticscuttle-e44a7e37b6c7b5961adaffc62b9042b8d442938e.tar.bz2
New feature: basic Ajax suggestion for tags and implementation of Dojo toolkit
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@151 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'includes/js/dojox/wire/tests/markup/Invocation.html')
-rw-r--r--includes/js/dojox/wire/tests/markup/Invocation.html53
1 files changed, 53 insertions, 0 deletions
diff --git a/includes/js/dojox/wire/tests/markup/Invocation.html b/includes/js/dojox/wire/tests/markup/Invocation.html
new file mode 100644
index 0000000..dd6f6e4
--- /dev/null
+++ b/includes/js/dojox/wire/tests/markup/Invocation.html
@@ -0,0 +1,53 @@
+<html>
+<head>
+<title>Test Invocation</title>
+<script type="text/javascript" src="../../../../dojo/dojo.js" djConfig="isDebug: true, parseOnLoad:true "></script>
+<script type="text/javascript">
+dojo.provide("dojox.wire.ml.tests.markup.Invocation");
+
+dojo.require("dojo.parser");
+dojo.require("doh.runner");
+dojo.require("dojox.wire.ml.Invocation");
+
+dojox.wire.ml.tests.markup.Invocation = {
+ invoke: function(p1, p2){return p1 + p2;},
+ invokeError: function(p){throw new Error(p);},
+ parameters: {a: "A", b: "B", c: "C"}
+};
+
+dojo.addOnLoad(function(){
+ doh.register("dojox.wire.ml.tests.markup.Invocation", [
+
+ function test_Invocation_method(t){
+ dojo.publish("invokeMethod");
+ t.assertEqual("AB", dojox.wire.ml.tests.markup.Invocation.result);
+ },
+
+ function test_Invocation_topic(t){
+ dojo.publish("invokeTopic");
+ t.assertEqual("C", dojox.wire.ml.tests.markup.Invocation.error);
+ }
+
+ ]);
+ doh.run();
+});
+</script>
+</head>
+<body>
+<div dojoType="dojox.wire.ml.Invocation"
+ triggerTopic="invokeMethod"
+ object="dojox.wire.ml.tests.markup.Invocation"
+ method="invoke"
+ parameters="dojox.wire.ml.tests.markup.Invocation.parameters.a,dojox.wire.ml.tests.markup.Invocation.parameters.b"
+ result="dojox.wire.ml.tests.markup.Invocation.result"></div>
+<div dojoType="dojox.wire.ml.Invocation"
+ triggerTopic="invokeTopic"
+ topic="invokeError"
+ parameters="dojox.wire.ml.tests.markup.Invocation.parameters.c"></div>
+<div dojoType="dojox.wire.ml.Invocation"
+ triggerTopic="invokeError"
+ object="dojox.wire.ml.tests.markup.Invocation"
+ method="invokeError"
+ error="dojox.wire.ml.tests.markup.Invocation.error"></div>
+</body>
+</html>