Custom JSP tag. Lets you create HTML select control with sorting buttons. So you will be able to change order for elements in your list.
For example:
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:
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.
Tags are:
sortedList
Body tag. Creates select control with sorting functionality. Parameters are:
1) name name for element
2) size Optional parameter. Defines how many elements are visible.
Default value is 5
3) id Optional parameter. Defines a CSS/XHTML id
4) className Optional parameter. Defines a CSS class name
5) style Optional parameter. Defines a CSS style
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
option
Body tag. Describes an option for your select control (as tag's body). Parameters are:
1) value Optional parameter. Describes a value for this option.
for downloading:
Library: sortedtag.jar Description: taglib.tld
See also Coldtags suite - the largest collection of custom JSP tags.