source: Dev/trunk/src/client/dojox/data/demos/demo_MultiStores.html

Last change on this file was 483, checked in by hendrikvanantwerpen, 11 years ago

Added Dojo 1.9.3 release.

File size: 4.2 KB
Line 
1<!--
2  This file is a demo of multiple dojo.data aware widgets using different datastore implementations for displaying data.
3-->
4<html>
5<head>
6        <title>Demo of Multiple Widgets using different Datastores</title>
7        <style type="text/css">
8                @import "../../../dijit/themes/tundra/tundra.css";
9                @import "../../../dojo/resources/dojo.css";
10                @import "../../../dijit/tests/css/dijitTests.css";
11        </style>
12
13        <script type="text/javascript" src="../../../dojo/dojo.js" djConfig="isDebug: true, parseOnLoad: true"></script>
14        <script type="text/javascript">
15                dojo.require("dojo.parser");
16                dojo.require("dijit.form.ComboBox");
17                dojo.require("dijit.form.FilteringSelect");
18                dojo.require("dijit.Tree");
19                dojo.require("dijit.tree.ForestStoreModel");
20
21                dojo.require("dojox.data.OpmlStore");
22                dojo.require("dojox.data.XmlStore");
23                dojo.require("dojo.data.ItemFileReadStore");
24
25        </script>
26</head>
27
28<body class="tundra">
29        <h1>
30                DEMO:  Multiple DataStore implementations with dojo.data aware Widgets
31        </h1>
32        <hr>
33        <h3>
34                Description:
35        </h3>
36        <p>
37                This simple demo shows how widgets which know only the dojo.data interfaces can work with data sources of varying formats.  In this case an OpmlStore
38                and a ItemFileReadStore are used to house the same data in different formats.
39        </p>
40
41        <blockquote>
42
43        <!--
44                The store instances used by this demo.
45        -->
46        <div dojoType="dojo.data.ItemFileReadStore" url="geography.json"               jsId="ifrGeoStore"></div>
47        <div dojoType="dojox.data.OpmlStore"        url="geography.xml"   label="text" jsId="opmlGeoStore"></div>
48        <div dojoType="dojox.data.XmlStore"         url="geography2.xml"  label="text" attributeMap="{'text': '@text'}" jsId="xmlGeoStore"></div>
49   
50        <h3>
51                Widgets using OpmlStore:
52        </h3>
53        <blockquote>
54                <b>ComboBox:</b><br>
55                <input dojoType="dijit.form.ComboBox" id="combo1" name="combo1" class="medium" store="opmlGeoStore" searchAttr="text" query="{}"></input>
56                <br>
57                <br>
58                <b>Filtering Select:</b><br>
59                <input dojoType="dijit.form.FilteringSelect" id="fs1" name="fs1" class="medium" store="opmlGeoStore" searchAttr="text" query="{}"></input>
60                <br>
61                <br>
62       
63                <b>Tree:</b><br>
64                <div dojoType="dijit.tree.ForestStoreModel" jsId="opmlModel"
65                        store="opmlGeoStore" query="{}"
66                        rootId="Continents" rootLabel="Continents" childrenAttrs="children">
67            </div>
68                <div dojoType="dijit.Tree" id="tree1" model="opmlModel"></div>
69        </blockquote>
70   
71        <h3>
72                Widgets using ItemFileReadStore:
73        </h3>
74        <blockquote>
75                <b>ComboBox:</b><br>
76                <input dojoType="dijit.form.ComboBox" id="combo2" name="combo2" class="medium" store="ifrGeoStore" searchAttr="name" query="{}"></input>
77                <br>
78                <br>
79       
80            <b>Filtering Select:</b><br>
81                <input dojoType="dijit.form.FilteringSelect" id="fs2" name="fs2" class="medium" store="ifrGeoStore" searchAttr="text" query="{}"></input>
82                <br>
83                <br>
84       
85                <b>Tree:</b><br>
86                <div dojoType="dijit.tree.ForestStoreModel" jsId="ifrModel"
87                        store="ifrGeoStore" query="{}"
88                        rootId="Continents" rootLabel="Continents" childrenAttrs="children">
89            </div>
90                <div dojoType="dijit.Tree" id="tree2" model="ifrModel"></div>
91        </blockquote>
92   
93        <h3>
94                Widgets using XmlStore:
95        </h3>
96        <blockquote>
97                <b>ComboBox:</b><br>
98                <input dojoType="dijit.form.ComboBox" id="combo3" name="combo3" class="medium" store="xmlGeoStore" searchAttr="text" query="{}"></input>
99                <br>
100                <br>
101               
102            <b>Filtering Select:</b><br>
103                <input dojoType="dijit.form.FilteringSelect" id="fs3" name="fs3" class="medium" store="xmlGeoStore" searchAttr="text" query="{}"></input>
104                <br>
105                <br>
106       
107                <b>Tree:</b><br>
108                <div dojoType="dijit.tree.ForestStoreModel" jsId="xmlModel"
109                        store="xmlGeoStore" query="{}"
110                        rootId="Continents" rootLabel="Continents" childrenAttrs="childNodes">
111            </div>
112                <div dojoType="dijit.Tree" id="tree3" model="xmlModel"></div>
113        </blockquote>
114        </blockquote>
115</body>
116</html>
Note: See TracBrowser for help on using the repository browser.