WebObjects/Web Applications/Development/Examples/Alphabetic List

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.

Here is the html:

     |                     <webobject name = "Prefix"> <webobject name = "Suffix"> <webobject name = "HasNoHref"> <webobject name = "Link"><webobject name = "Prefix"> <webobject name = "Suffix"> <webobject name = "HasBatches"> <td align = "left" valign ="top"> <webobject name = "PreviousLink"><webobject name = "Previous"> <td align = "left" valign = "top"> <td align = "right" valign ="top"> <webobject name = "NextLink"><webobject name = "Next">

And the wod:

HasData: WOConditional{ condition = hasData; }; Table: WOGenericContainer{ elementName = "table"; border = "0"; cellSpacing = "3"; cellPadding = "0"; }; ItemDescription: SpanString{ value = itemDescription; isSmall = true; class = "Label"; }; HasBatches: WOConditional{ condition = hasBatches; }; Batches: WORepetition{ count = batchCount; index = batchIndex; }; Batch: SpanString{ value = batchLabel; isItalic = isCurrentBatch; isSmall = true; class = "Label"; }; IsCurrentBatch: WOConditional{ condition = isCurrentBatch; }; IsNotCurrentBatch: WOConditional{ condition = isCurrentBatch; negate = true; }; BatchLink: WOHyperlink{ action = displayBatch; }; Rows: WORepetition{ count = rowCount; index = rowIndex; }; Columns: WORepetition{ count = columnCount; index = columnIndex; }; Prefix: SpanString{ value = prefix; isBold = shouldBreak; class = "Text"; }; Suffix: SpanString{ value = suffix; class = "Text"; }; ShouldBreak: WOConditional{ condition = shouldBreak; }; Link: WOHyperlink{ action = displayItem; title = altDescription; }; HasHref: WOConditional{ condition = hasHref; }; HasNoHref: WOConditional{ condition = hasHref; negate = true; }; HrefLink: WOHyperlink{ href = href; title = altDescription; target = "SZLink"; }; PreviousLink: WOHyperlink{ action = displayPrevious; }; Previous: SpanString{ value = "<PREVIOUS"; isSmall = true; class = "Label"; }; NextLink: WOHyperlink{ action = displayNext; }; Next: SpanString{ value = "NEXT>"; isSmall = true; class = "Label"; };

As usual, the component implementation is left to the imagination of the reader.