| 1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" |
| 2 |
"http://www.w3.org/TR/html4/strict.dtd"> |
| 3 |
<html> |
| 4 |
<head> |
| 5 |
<title>Dojox Iterator Test</title> |
| 6 |
<style type="text/css"> |
| 7 |
@import "../../../dojo/resources/dojo.css"; |
| 8 |
@import "../../../dijit/themes/tundra/tundra.css"; |
| 9 |
@import "../../../dijit/themes/dijit.css"; |
| 10 |
@import "../../../dijit/tests/css/dijitTests.css"; |
| 11 |
</style> |
| 12 |
|
| 13 |
|
| 14 |
<script type="text/javascript" src="../../../dojo/dojo.js" data-dojo-config="isDebug:true, parseOnLoad: true"></script> |
| 15 |
|
| 16 |
|
| 17 |
<script type="text/javascript" src="../../../dijit/tests/_testCommon.js"></script> |
| 18 |
|
| 19 |
<script type="text/javascript"> |
| 20 |
dojo.require("dijit.layout.TabContainer"); |
| 21 |
dojo.require("dijit.layout.SplitContainer"); |
| 22 |
dojo.require("dojo.data.ItemFileReadStore"); |
| 23 |
dojo.require("dojox.widget.Iterator"); |
| 24 |
dojo.require("dojo.parser"); // scan page for widgets and instantiate them |
| 25 |
</script> |
| 26 |
|
| 27 |
</head> |
| 28 |
<body class="tundra"> |
| 29 |
|
| 30 |
<h1 class="testTitle">Dojox Iterator test</h1> |
| 31 |
|
| 32 |
<div dojoType="dojo.data.ItemFileReadStore" |
| 33 |
url="../../../dijit/tests/_data/countries.json" |
| 34 |
data-dojo-id="stateStore"></div> |
| 35 |
|
| 36 |
<h3>Data store backed Iterator</h3> |
| 37 |
<ul> |
| 38 |
<li>before</li> |
| 39 |
<li dojoType="dojox.widget.Iterator" |
| 40 |
query="{ name: 'A*' }" |
| 41 |
store="stateStore"> |
| 42 |
${name} |
| 43 |
</li> |
| 44 |
<li>after</li> |
| 45 |
</ul> |
| 46 |
|
| 47 |
<h3>Array backed Iterator</h3> |
| 48 |
<ul> |
| 49 |
<li>before</li> |
| 50 |
<script> |
| 51 |
var tdata = [ |
| 52 |
{ thinger: "blah", name: "named:" }, |
| 53 |
{ thinger: "..." }, |
| 54 |
{ thinger: "w00t!" } |
| 55 |
]; |
| 56 |
</script> |
| 57 |
<li dojoType="dojox.widget.Iterator" |
| 58 |
defaultValue="*this space intentionally left blank*" |
| 59 |
data="tdata"> |
| 60 |
${name} ${thinger} |
| 61 |
</li> |
| 62 |
<li>after</li> |
| 63 |
</ul> |
| 64 |
|
| 65 |
<h3>Array-property Iterator</h3> |
| 66 |
<ul> |
| 67 |
<li>before</li> |
| 68 |
<li>blah</li> |
| 69 |
<li dojoType="dojox.widget.Iterator" |
| 70 |
dataValues="thinger, blah, blah"> |
| 71 |
${value} |
| 72 |
</li> |
| 73 |
<li>after</li> |
| 74 |
</ul> |
| 75 |
|
| 76 |
</body> |
| 77 |
</html> |