State tag ver. 2.0

    Custom JSP tag. Lets you present a list of US (Canadian) states in your forms. This tag is derivative of the standard HTML select tag. For example:
 


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

<form ...>
...
<get:state name="st"/>
...
</form>

and you will get the following HTML code:

Tags are:

state

Presents a list of states as a combo box (HTML select control). Tag uses standard abbreviations for selected values. Parameters are:

1) name name for combo box (select control)
2) default Optional parameter. Describes a default selection (state code).
3) autoSubmit Optional parameter. Possible values are true and false. Enables/disables form submission after selection. Default value is false (disabled).
4) prompt Optional parameter. Lets you add a prompt phrase (e.g. Please, choose your state). This option will be a default (selected) option with empty value. Default value for this parameter is empty (no prompt).
5) none Optional parameter. If this value is not empty tag adds an appropriate option at the end of the list (the value for this option is also none). Default value for this parameter is empty.
6) id Optional parameter. Describes a DHTML (XHTML) id for this control
7) className Optional parameter. Describes a CSS class
8) style Optional parameter. Describes a CSS style
9) canadian Optional parameter. Possible values are true and false. If this value is true tag will add Canadian provinces also. Default value is false.
10) pr Optional parameter. Possible values are true and false. If this value is true tag will add Puerto Rico also. Default value is false.
11) disabled Optional parameter. Possible values are true and false. Enables/disables this control. Default value is false (enabled).

for downloading:

Library: statetag.jar    Description: taglib.tld

 © Coldbeans      Comments?

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