Sorting taglib ver. 1.2

    Custom JSP taglib lets you sort tag's body. Tag sort treats own body as a set of text elements with delimiters and outputs them in the lexical order. Default delimiter is just a new line symbol. For example:

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

<br>4. Line 4
<br>2. Line 2
<br>3. Line 3
<br>1. Line 1

In this case tag will produce the following output:

1. Line 1
2. Line 2
3. Line 3
4. Line 4

Tags are:


Body tag that sorts own body. Parameters are:

1) delimiter Optional parameter. Describes a delimiter for the elements in tag's body. Default value is \n (new line)
2) direction Optional parameter. Possible values are asc or desc. Describes an order (ascendant or descendant). Default value is asc.
3) id Optional parameter. Describes a name for the page scope variable (type is java.lang.String) with sorted data. Without this parameter tag just prints data.
4) cond Optional parameter. Describes a boolean value tag's behavior depends on. Default value is true (sort)

for downloading:

Library: sorttag.jar    Description: taglib.tld

 © Coldbeans       Comments?

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

Also in Coldtags: