Custom input taglib ver. 1.3

    Custom JSP taglib for UI development. This taglib lets you create a text input field (like a normal HTML input tag) with some associated list of predefined values. So your users will be able not only type a value but also select it from the some list. For example:
 


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

Product:
<cin:cinput name="a" listBackground="white">
  <cin:option>Coldtags suite</cin:option>
  <cin:option>JSOS suite</cin:option>
  <cin:option>JMX suite</cin:option>
</cin:cinput>

and you will get some like this

Product:

You can provide a list of the predefined values directly or prepare it in your servlet (Struts action) and pass to tag a parameter list. This value could be Collection, Iterator, Enumeration, Vector, Array or commas separated string.
Alternative you can pass a name for some attribute in the request (page, session, application) scope. This attribute could be again Collection, Iterator, Enumeration, Vector, Array or commas separated string. In this case parameter name is listBean.

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:

cinput

Body tag mimics HTML input tag. Parameters are:

1) name Describes a name for your input tag
2) id Optional parameter. Describes a DHTML id for your input tag.
3) className Optional parameter. Describes a CSS class for your input element
4) style Optional parameter. Describes your own CSS style.
5) size Optional parameter. Describes a size for your input tag
6) value Optional parameter. Describes an initial value for your input tag.
7) listBorderWidth Optional parameter. Describes a width for the border in your list. Default value is 1px.
8) listBorderColor Optional parameter. Describes a color for list's border. Default value is black.
9) listWidth Optional parameter. Describes a width for your list. Default value is 180px.
10) listHeight Optional parameter. Describes a height for your list. Default value is 80px.
11) listBackground Optional parameter. Describes a background for your list.
12) listClassName Optional parameter. Describes list's CSS class.
13) list Optional parameter. Describes a collection for elements in your list
14) listBean Optional parameter. Describes a name for the attribute with list's elements collection.
15) img Optional parameter. Describes a path for your image. Default value is down.jpg.

option

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

1) className Optional parameter. Describes your own CSS class for this option
2) style Optional parameter. Describes your own CSS style.

for downloading:

Library: cinputtag.jar    Description: taglib.tld
Default image: down.jpg

© Coldbeans      Comments?

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

Also in Coldtags: