PATH  WebObjects 4.0 Documentation > Applet Controls

Previous Section


ListApplet



Synopsis

WOApplet { code = "next.wo.client.controls.ListApplet.class";
itemList=arrayOfItems; selectedItems=arrayOfIndices; allowsMultipleSelection="YES"|"NO"; action=actionMethod;
selectionChanged=changeMethod;...};

Description

A ListApplet presents a list of items that allows multiple selections. Users select and deselect items in the list by clicking them. By default, this control disallows multiple selections, so you must set allowsMultipleSelection to YES to get the multiple-selection capability. The way the actionMethod is invoked in the component object differs for single and multiple selections. To invoke the method with a single selection, the user double-clicks the selection (this works even in multiple-selection mode). To invoke the actionMethod when there are multiple selections, the user must press the Return key. A ListApplet also invokes the changeMethod in the server-side component (if implemented) whenever a change is made in the selection.

itemList
An array of string objects that are displayed as the choices.

selectedItems
An array of string objects representing the numeric indices of the selected items in the list.

allowsMultipleSelection
If this value of this key evaluates to "YES", the user can select multiple items by clicking them in series. If "NO", the prior selection is deselected every time the user makes a new selection.

action
The method invoked when the user double-clicks a single item in the list or presses the Return key.

selectionChanged
The method invoked when an item in the list is selected or deselected.

Next Section