Multiple columns taglib ver. 1.5

    Custom JSP taglib. Lets you format HTML output as a multiple columns list. As a source for your data you can use some collection, array or iterator. Also you can describe individual elements with body tag setElement.

For example:

outputs some array as a grid from 3 columns:
 


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

<do:multicolumns cols="3" source="<%=my_array_with_data%>"/>

or you may directly define all the elements with a special body tag:
 


<do:multicolumns cols="2">
  <do:setElement> first </do:setElement>
  <do:setElement> second </do:setElement>
   ...
</do:multicolumns>

Tags are:

multicolumns

Outputs grid for data. Parameters are:

1) cols how many columns
2) source Describes data source. Could be an array, collection, iterator or enumeration.
3) direction Optional parameters. Describes how to form columns from data elements. Possible values are horizontal or vertical. If this value is vertical tag outputs data by columns, otherwise it will be done by rows. Default value is horizontal.
4) from Optional parameter. Describes an initial element (position) for loop your through datasource. Starts with 1. Default value is 1 (first element or first row).
5) to Optional parameter. Describes a last element (position) for loop through your datasource. By default tag scans all elements (up to last position).
6) className Optional parameter. Describes a CSS class.
7) style Optional parameter. Describes a CSS style.

setElement

Describes one element for parent's multicolumns tag. Parameters are: none.

for downloading:

Library: mcoltag.jar    Description: taglib.tld

© Coldbeans      Comments?

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

Also in Coldtags: