Label taglib ver. 1.5

    Custom JSP taglib. This taglib lets you add labels to you HTML pages. These labels are similar to well-known GUI elements in .NET or any Windows API. So labels are named objects with the ability to change value (label, caption) in run-time.

You have to define labels within of HTML forms or within of form tag. For example:

<%@ taglib uri="taglib.tld" prefix="lb" %>
 <lb:label name="label1" foreground="red" background="#FFFFF0">Test</lb:label>

and you will get some like this:


and this label is not a static HTML text. You may read current value in your server-side code:


E.g. for the above mentioned example: request.getParameter("label1").

You may change also this value with JavaScript:

name_for_your_form.name_for_your_label.value='new value';

You may allow edit mode for labels:

<lb:label name="label2" background="#FFFFF0" edit="true">Test1</lb:label>

Tags are:


Body tag. Defines a label in your HTML code. Tag's body describes current value (caption). Parameters are:

1) name Optional parameter. Describes label's name
2) background Optional parameter. Describes a background color. Default value is white.
3) foreground Optional parameter. Describes a foreground color. Default value is black.
4) fontSize Optional parameter. Describes a font size. E.g. fontSize="15px"
5) fontFace Optional parameter. Describes a font face. E.g. fontFace="Arial"
6) fontStyle Optional parameter. Describes a font style. Possible values are bold or italic
7) size Optional parameter. Describes a size for your label itself.
8) edit Optional parameter. Possible values are true or false. If this value is true you will be able to edit label's caption. Default value is false.
9) showBorder Optional parameter. Possible values are true or false. If this value is true than border in edit mode will be visible. Default value is true.

for downloading:

Library: labeltag.jar    Description: taglib.tld

© Coldbeans      Comments?

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

Also in Coldtags: