summaryrefslogtreecommitdiff
path: root/includes/js/dojox/wire/tests/markup/DataStore.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/DataStore.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/DataStore.html')
-rw-r--r--includes/js/dojox/wire/tests/markup/DataStore.html66
1 files changed, 66 insertions, 0 deletions
diff --git a/includes/js/dojox/wire/tests/markup/DataStore.html b/includes/js/dojox/wire/tests/markup/DataStore.html
new file mode 100644
index 0000000..3c55f7e
--- /dev/null
+++ b/includes/js/dojox/wire/tests/markup/DataStore.html
@@ -0,0 +1,66 @@
+<html>
+<head>
+<title>Test DataStore</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.DataStore");
+
+dojo.require("dojo.parser");
+dojo.require("doh.runner");
+dojo.require("dojox.wire.ml.DataStore");
+dojo.require("dojox.wire.ml.Invocation");
+dojo.require("dojox.wire.ml.Transfer");
+
+dojox.wire.ml.tests.markup.DataStore = {
+ request: {onComplete: function(){}, onError: function(){}}
+};
+
+dojo.addOnLoad(function(){
+ doh.register("dojox.wire.ml.tests.markup.DataStore", [
+
+ function test_DataStore_url(t){
+ var d = new doh.Deferred();
+ dojo.connect(dojox.wire.ml.tests.markup.DataStore.request, "onComplete", function(){
+ t.assertEqual("X1", dojox.wire.ml.tests.markup.DataStore.target[0].a);
+ t.assertEqual("Y2", dojox.wire.ml.tests.markup.DataStore.target[1].b);
+ t.assertEqual("Z3", dojox.wire.ml.tests.markup.DataStore.target[2].c);
+ d.callback(true);
+ });
+ dojo.connect(dojox.wire.ml.tests.markup.DataStore.request, "onError", function(error){
+ d.errback(error);
+ });
+ dojo.publish("invokeFetch");
+ return d;
+ }
+
+ ]);
+ doh.run();
+});
+</script>
+</head>
+<body>
+<div dojoType="dojox.wire.ml.DataStore"
+ id="DataStore1"
+ storeClass="dojox.data.XmlStore"
+ url="DataStore.xml"></div>
+<div dojoType="dojox.wire.ml.Invocation"
+ triggerTopic="invokeFetch"
+ object="DataStore1"
+ method="fetch"
+ parameters="dojox.wire.ml.tests.markup.DataStore.request">
+</div>
+<div dojoType="dojox.wire.ml.Transfer"
+ trigger="dojox.wire.ml.tests.markup.DataStore.request"
+ triggerEvent="onComplete"
+ source="arguments[0]"
+ sourceStore="DataStore1.store"
+ target="dojox.wire.ml.tests.markup.DataStore.target">
+ <div dojoType="dojox.wire.ml.ColumnWire"
+ column="a" attribute="x"></div>
+ <div dojoType="dojox.wire.ml.ColumnWire"
+ column="b" attribute="y"></div>
+ <div dojoType="dojox.wire.ml.ColumnWire"
+ column="c" attribute="z"></div>
+</div>
+</body>
+</html>