root / trunk / templates / grid.xml

Revision 1568, 4.5 kB (checked in by david, 3 years ago)

updating EOLs

  • Property svn:eol-style set to native
Line 
1<?xml version="1.0" encoding="utf-8"?>
2<dojo:application xmlns:dojo="http://www.dojotoolkit.org/2004/dojoml" xmlns:xlink="http://www.w3.org/1999/xlink">
3        <dojo:grid id="dojoGridExample" dataProvider="gridExampleDataModel" propertyProviderList="gridDefinitions" />
4        <dojo:propertySet id="gridDefinitions" componentClass="default">
5                <dojo:propertySet xlink:href="grid.css/.dojoGrid" sourceType="css" targetType="all" />
6                <dojo:propertySet xlink:href="#gridEvents" sourceType="xml" targetType="all"  />
7                <dojo:event type="onclick" target="gridCellItem" action="evt.target.highlight()" />
8                <dojo:sort type="user" />
9                <dojo:head>
10                        <dojo:rows>
11                                <dojo:repetition frequency="1" propertyProviderList="grid.css/.headRowClassName1" sourceType="css" targetType="all" />
12                                <dojo:rowHeight>1.5em</dojo:rowHeight><!-- should this really be height... what if we wanted to be able to specify rowHeight as an attribute of the dojo:grid element? -->
13                                <dojo:cells>
14                                        <dojo:repetition frequency="1" propertyProviderList="grid.css/.headCellClassName1" sourceType="css" targetType="all" />
15                                </dojo:cells>
16                        </dojo:rows>
17                </dojo:head>
18                <dojo:body>
19                        <dojo:rows>
20                                <dojo:repetition frequency="1" propertyProviderList="grid.css/.bodyRowClassName1, grid.css/.bodyRowClassName2" sourceType="css" targetType="html" />
21                                <dojo:repetition frequency="1" propertyProviderList="gridSVG.css/.bodyRowClassName1, gridSVG.css/.bodyRowClassName2" sourceType="css" targetType="svg" />
22                                <dojo:rowHeight>1.2em</dojo:rowHeight>
23                                <dojo:cells>
24                                        <dojo:repetition frequency="1" propertyProviderList="grid.css/.bodyCellClassName1, grid.css/.bodyRowClassName1" sourceType="css" targetType="html" />
25                                        <dojo:repetition frequency="1" propertyProviderList="gridSVG.css/.bodyRowClassName1, gridSVG.css/.bodyRowClassName1" sourceType="css" targetType="svg" />
26                                </dojo:cells>
27                        </dojo:rows>
28                </dojo:body>
29                <dojo:foot>
30                        <dojo:rows>
31                                <dojo:cssClassList>footRowClassName1</dojo:cssClassList>
32                                <dojo:rowHeight>1.5em</dojo:rowHeight>
33                                <dojo:cells>
34                                        <dojo:cssClassList>footCellClassName1</dojo:cssClassList>
35                                </dojo:cells>
36                        </dojo:rows>
37                </dojo:foot>
38        </dojo:propertySet>
39        <dojo:dataModel id="gridExampleDataModel" src="#staticExampleModel" type="xml"><!-- this example shows inclusion of only certain elements from a data structure -->
40                <dojo:label elementName="name" />
41                <dojo:gridRowItem elementName="structure">
42                        <dojo:gridCellItem elementName="subStructure" />
43                        <dojo:gridCellItem elementName="subStructure3" />
44                        <dojo:gridCellItem elementName="subStructure4" />
45                </dojo:gridRowItem>
46        </dojo:dataModel>
47
48        <dojo:dataModel id="gridExampleDataModel2" src="#staticExampleModel" type="xml"><!-- this example shows combining a couple of fields -->
49                <dojo:label elementName="name" />
50                <dojo:gridRowItem elementName="structure">
51                        <dojo:gridCellItem elementName="subStructure" />
52                        <dojo:gridCellItem>
53                                <dojo:elementName>substructure2</dojo:elementName>
54                                <dojo:elementName>substructure3</dojo:elementName>
55                                <!-- TODO: do we want a way to define simple operations between combined items, as well as a way to parse data, show substrings, etc.? -->
56                        </dojo:gridCellItem>
57                        <dojo:gridCellItem elementName="subStructure4" />
58                </dojo:gridRowItem>
59        </dojo:dataModel>
60
61        <dojo:dataModel id="gridExampleDataModel3" src="gridData.js#staticExampleModel" type="javascript"><!-- this example references a javascript version of the model -->
62                <dojo:label elementName="name" />
63                <dojo:gridRowItem elementName="structure">
64                        <dojo:gridCellItem elementName="subStructure" />
65                        <dojo:gridCellItem>
66                                <dojo:elementName>substructure2</dojo:elementName>
67                                <dojo:elementName>substructure3</dojo:elementName>
68                        </dojo:gridCellItem>
69                        <dojo:gridCellItem elementName="subStructure4" />
70                </dojo:gridRowItem>
71        </dojo:dataModel>
72
73        <arbitraryDataStructure id="staticExampleModel">
74                <name>testGrid</name>
75                <structure>
76                        <subStructure>
77                                item11
78                        </subStructure>
79                        <subStructure2>
80                                item12
81                        </subStructure2>
82                        <subStructure3>
83                                item13
84                        </subStructure3>
85                        <subStructure4>
86                                item14
87                        </subStructure4>
88                </structure>
89                <structure>
90                        <subStructure>
91                                item21
92                        </subStructure>
93                        <subStructure2>
94                                item22
95                        </subStructure2>
96                        <subStructure3>
97                                item23
98                        </subStructure3>
99                        <subStructure4>
100                                item24
101                        </subStructure4>
102                </structure>
103                <structure>
104                        <subStructure>
105                                item31
106                        </subStructure>
107                        <subStructure2>
108                                item32
109                        </subStructure2>
110                        <subStructure3>
111                                item33
112                        </subStructure3>
113                        <subStructure4>
114                                item34
115                        </subStructure4>
116                </structure>
117        </arbitraryDataStructure>
118</dojo:application>
Note: See TracBrowser for help on using the browser.