Custom JSP taglib lets you restrict the visible area for your text. So you can
use this taglib for wrapping columns in your tables. For example:
it is the original HTML table:
1 |
here is a very very long string. So this string will be automatically whapped by default |
2 |
here is also a very very long string. So this string will be automatically whapped by default too |
with cell tag:
<%@ taglib uri="taglib.tld" prefix="c" %>
<table cellspacing="0" border="1" style="width:200">
<tr>
<td>1</td>
<td><c:Cell width="150px;" height="18px">here is a very very long string. So this string will be automatically whapped by default</c:Cell></td>
</tr>
<tr>
<td>2</td>
<td><c:Cell width="150px;" height="18px">here is also a very very long string. So this string will be automatically whapped by default too</c:Cell></td>
</tr>
</table>
and you will get this:
1 |
here is a very very long string. So this string will be automatically whapped by default |
2 |
here is also a very very long string. So this string will be automatically whapped by default too |
Tags are:
Cell
Body tag displays your content in the restricted area. Parameters are:
1) id Optional parameter. Describes a CSS/DHTML id for your cell.
2) width Describes a width for your cell.
3) height Describes a height for your cell.
4) title Describes a title (tooltip) for your cell.
5) className Optional parameter. Describes a CSS class.
6) onClick Optional parameter. Describes a JavaScript code that will be executed as onClick event.
7) onMouseOver Optional parameter. Describes a JavaScript code that will be executed as onMouseOver event.
8) onMouseOut Optional parameter. Describes a JavaScript code that will be executed as onMouseOut event.
9) cond Optional parameter. Describes a boolean value tag's behavior depends on. Default value is true
for downloading:
Library: celltag.jar
Description: taglib.tld
© Coldbeans
Comments?
See also Coldtags suite - the largest collection of custom JSP tags.
|