aboutsummaryrefslogtreecommitdiff
path: root/includes/js/dojox/widget/tests/test_Iterator.html
blob: 7cf82ff16dfd084283c9eca40fcff0a070f5e16d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<title>Dojox Iterator Test</title>
	<style type="text/css">
		@import "../../../dojo/resources/dojo.css";
		@import "../../../dijit/themes/tundra/tundra.css";
		@import "../../../dijit/themes/dijit.css";
		@import "../../../dijit/tests/css/dijitTests.css"; 
	</style>

	<script type="text/javascript" src="../../../dojo/dojo.js" 
		djConfig="isDebug: true, debugAtAllCosts: false, parseOnLoad: true"></script>
	<script type="text/javascript" src="../../../dijit/tests/_testCommon.js"></script>
	<script type="text/javascript">
		dojo.require("dijit.layout.TabContainer");
		dojo.require("dijit.layout.SplitContainer");
		dojo.require("dojo.data.ItemFileReadStore"); 
		dojo.require("dojox.widget.Iterator"); 
		dojo.require("dojo.parser");	// scan page for widgets and instantiate them
	</script>
</head>
<body>

	<h1 class="testTitle">Dojox Iterator test</h1>

	<div dojoType="dojo.data.ItemFileReadStore" 
		url="../../../dijit/tests/_data/countries.json" 
		jsId="stateStore"></div>
	
	<h3>Data store backed Iterator</h3>
	<ul>
		<li>before</li>
		<li dojoType="dojox.widget.Iterator" 
			query="{ name: 'A*' }"
			store="stateStore">
			${name}
		</li>
		<li>after</li>
	</ul>

	<h3>Array backed Iterator</h3>
	<ul>
		<li>before</li>
		<script>
			var tdata = [
				{ thinger: "blah", name: "named:" },
				{ thinger: "..." },
				{ thinger: "w00t!" }
			];
		</script>
		<li dojoType="dojox.widget.Iterator" 
			defaultValue="*this space intentionally left blank*"
			data="tdata">
			${name} ${thinger}
		</li>
		<li>after</li>
	</ul>

	<h3>Array-property Iterator</h3>
	<ul>
		<li>before</li>
		<li>blah</li>
		<li dojoType="dojox.widget.Iterator" 
			dataValues="thinger, blah, blah">
			${value}
		</li>
		<li>after</li>
	</ul>

</body>
</html>