Sun Java System Web Server 6.1 SP7 Programmer's Guide to Web Applications



Creates a hidden inputbox or select box, or multiple checkboxes depending on the attribute input. If there is only one collection, the tag creates a hidden inputbox by default.


Name. Specifies the name of the form element created. The default is "c."

items. (optional) A comma-delimited string representing search collections available. The tag retrieves all collections available on the server if the attribute is empty.

Type. (optional) The type of form element used for displaying collections. Valid options are hidden, select, and checkbox. If there is only one collection, the default value is hidden else the default value is checkbox.

Rows. (optional) Represents size if type is select, or number of rows if checkboxes. The default behavior is to satisfy the Cols attribute first. That is, the collections will be listed in columns as specified by the Cols attribute.

Cols. Represents number of columns and is only required if type is checkbox. If Cols and Rows are not specified, the collections will be listed horizontally, that is, in one row.

Defaults. Specifies a comma-delimited string containing 1s or 0s indicating the selection status of the search collections. An item is selected if 1, and not selected if 0. If there is a form action, these values will be retrieved from the form elements.

cssClass. (optional) The class name that will be used in every HTML tag created in this tag. This is particularly useful when the type is checkbox, since an HTML table will be used for the layout. See the sample code below for details.


<s1ws:collElem type="checkbox" cols="2" values="1,0,1,0" cssClass="body" >

This creates checkboxes in 2 columns with a default name "c," with the first and third items selected. Fonts and any other HTML styles are defined in css classes "body," which includes tr.body, td.body, and input.body.