Version 1.1 by smmccraw on 2007/07/08 09:45

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