Multi column combo box taglib ver. 1.3

    Custom JSP taglib for UI development. This taglib lets you create a multi column combo box. For example:
 


<%@ taglib uri="taglib.tld" prefix="m" %>

<m:MultiColumnComboBox name="m" listBackground="yellow">

<m:option value="1" onMouseOver="this.style.background='gray'" onMouseOut="this.style.background='yellow'">One</m:option>

<m:option value="2" onMouseOver="this.style.background='gray'" onMouseOut="this.style.background='yellow'">Two</m:option>

<m:option value="3" onMouseOver="this.style.background='gray'" onMouseOut="this.style.background='yellow'">Three</m:option>

<m:option value="4" onMouseOver="this.style.background='gray'" onMouseOut="this.style.background='yellow'">Four</m:option>

</m:MultiColumnComboBox>

and you will get some like this
 

You may obtain options through some array (collection, iterator etc.) and use this object for building your control:
 


<%
   java.util.Vector v=new java.util.Vector();
   v.addElement("Java");
   ...
%>

<m:MultiColumnComboBox name="m" listBackground="yellow" columns="3" source="<%=v%>" />

In this example (our collection contains Strings) tag iterates over elements and creates the control. You can pass a collection of beans also and describe how to get the value and text for options. Attribute option specifies what getXXX method is called on each item in your source for getting options. Attribute value does the same for values. E.g. option="name" means that that getName() call is used for getting options etc.

You have to use this tag inside of HTML form (or form taglib from Coldtags suite).

Note: the evaluation version supports up to 5 predefined values.

Tags are:

MultiColumnCombo

Body tag provides a multi column combo box control. Parameters are:

1) name Describes a name for your input tag
2) id Optional parameter. Describes a DHTML id for the selected option.
3) className Optional parameter. Describes a CSS class for the selected option
4) style Optional parameter. Describes your own CSS style.
5) columns Optional parameter. Describes how many columns must be in your grid. Default value is 2.
6) source Optional parameter. Describes collection, iterator, enumeration or array with elements (options) for selection.
7) option Optional parameter. Describes a name for property used for getting options
8) value Optional parameter. Describes a name for property used for getting values
9) listBorderWidth Optional parameter. Describes a width for the border in your list. Default value is 1px.
10) listBorderColor Optional parameter. Describes a color for list's border. Default value is black.
11) listWidth Optional parameter. Describes a width for your list. Default value is 150px.
12) listHeight Optional parameter. Describes a height for your list. Default value is 80px.
13) listBackground Optional parameter. Describes a background for your list.
14) listClassName Optional parameter. Describes a CSS class for your list.
15) disabled Optional parameter. Possible values are true or false. If this value is true than combo box is in the read-only mode. Default value is false.
16) onChange Optional parameter. Describes your own JavaScript code for the selection event
17) autoSubmit Optional parameter. Possible values are true or false. If this value is true than any selection will submit the form automatically. Default value is false.

option

Body tag lets you define an option for your combo box. Parameters are:

1) value Describes a value for this option.
2) title Optional parameter. Describes a tooltip for this option.
3) selected Optional parameter. Possible values are true or false. If this value if true than this option is selected. Default values is false.
4) style Optional parameter. Describes your own CSS style.
5) className Optional parameter. Describes your own CSS class for this option
6) onMouseOver Optional parameter. Describes your own JavaScript code for mouseover event.
7) onMouseOut Optional parameter. Describes your own JavaScript code for mouseout event.

for downloading:

Library: mccombotag.jar    Description: taglib.tld

© Coldbeans      Comments?

See also Coldtags suite - the largest collection of custom JSP tags.