Last modified by Pascal Robert on 2010/09/13 00:30

Show last authors
1 An alphabetic list is simply a list that display its elements in, er, alphabetic order... There is also some pagination (not shown) when there is too many elements in one batch. The pagination is done alphabetically at runtime if necessary: eg A-D E-Z.
2
3 Here is the html:
4
5 {{code}}
6
7 <webobject name = "HasData">
8 <webobject name = "Table">
9 <tr>
10 <td align = "left" valign = "top" colspan = "3">
11 <div class = "Line"></div>
12 <webobject name = "ItemDescription"></webobject>
13 <webobject name = "HasBatches">
14 <span class = "Label"><small>&nbsp;|&nbsp;</small></span>
15 <webobject name = "Batches">
16 <webobject name = "IsCurrentBatch">
17 &nbsp;<webobject name = "Batch"></webobject>
18 </webobject>
19 <webobject name = "IsNotCurrentBatch">
20 &nbsp;<webobject name = "BatchLink"><webobject name = "Batch"></webobject></webobject>
21 </webobject>
22 </webobject>
23 </webobject>
24 <div class = "Line"></div><br>
25 </td>
26 </tr>
27 <tr>
28 <webobject name = "Columns">
29 <td align = "left" valign = "top">
30 <webobject name = "Rows">
31 <webobject name = "HasHref">
32 <webobject name = "HrefLink"><webobject name = "Prefix"></webobject><webobject name = "Suffix"></webobject></webobject>&nbsp;&nbsp;&nbsp;
33 </webobject>
34 <webobject name = "HasNoHref">
35 <webobject name = "Link"><webobject name = "Prefix"></webobject><webobject name = "Suffix"></webobject></webobject>&nbsp;&nbsp;&nbsp;
36 </webobject>
37 <div class = "Space"></div>
38 </webobject>
39 </td>
40 </webobject>
41 </tr>
42 <webobject name = "HasBatches">
43 <tr>
44 <td align = "left" valign ="top">
45 <webobject name = "PreviousLink"><webobject name = "Previous"></webobject></webobject>
46 </td>
47 <td align = "left" valign = "top">
48 &nbsp;
49 </td>
50 <td align = "right" valign ="top">
51 <webobject name = "NextLink"><webobject name = "Next"></webobject></webobject>
52 </td>
53 </tr>
54 </webobject>
55 </webobject>
56 </webobject>
57
58 {{/code}}
59
60 And the wod:
61
62 {{code}}
63
64 HasData: WOConditional{
65 condition = hasData;
66 };
67
68 Table: WOGenericContainer{
69 elementName = "table";
70 border = "0";
71 cellSpacing = "3";
72 cellPadding = "0";
73 };
74
75 ItemDescription: SpanString{
76 value = itemDescription;
77 isSmall = true;
78 class = "Label";
79 };
80
81 HasBatches: WOConditional{
82 condition = hasBatches;
83 };
84
85 Batches: WORepetition{
86 count = batchCount;
87 index = batchIndex;
88 };
89
90 Batch: SpanString{
91 value = batchLabel;
92 isItalic = isCurrentBatch;
93 isSmall = true;
94 class = "Label";
95 };
96
97 IsCurrentBatch: WOConditional{
98 condition = isCurrentBatch;
99 };
100
101 IsNotCurrentBatch: WOConditional{
102 condition = isCurrentBatch;
103 negate = true;
104 };
105
106 BatchLink: WOHyperlink{
107 action = displayBatch;
108 };
109
110 Rows: WORepetition{
111 count = rowCount;
112 index = rowIndex;
113 };
114
115 Columns: WORepetition{
116 count = columnCount;
117 index = columnIndex;
118 };
119
120 Prefix: SpanString{
121 value = prefix;
122 isBold = shouldBreak;
123 class = "Text";
124 };
125
126 Suffix: SpanString{
127 value = suffix;
128 class = "Text";
129 };
130
131 ShouldBreak: WOConditional{
132 condition = shouldBreak;
133 };
134
135 Link: WOHyperlink{
136 action = displayItem;
137 title = altDescription;
138 };
139
140 HasHref: WOConditional{
141 condition = hasHref;
142 };
143
144 HasNoHref: WOConditional{
145 condition = hasHref;
146 negate = true;
147 };
148
149 HrefLink: WOHyperlink{
150 href = href;
151 title = altDescription;
152 target = "SZLink";
153 };
154
155 PreviousLink: WOHyperlink{
156 action = displayPrevious;
157 };
158
159 Previous: SpanString{
160 value = "<PREVIOUS";
161 isSmall = true;
162 class = "Label";
163 };
164
165 NextLink: WOHyperlink{
166 action = displayNext;
167 };
168
169 Next: SpanString{
170 value = "NEXT>";
171 isSmall = true;
172 class = "Label";
173 };
174
175 {{/code}}
176
177 As usual, the component implementation is left to the imagination of the reader.