Toolbar taglib ver. 1.9

    Custom JSP taglib. This taglib provides UI control for creating toolbars. For example:
 


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

<t:toolbar id="t1">

<t:element title="Stop"/>
<t:element title="Refresh"/>
<t:element title="Home"/>
<t:element title="Search"/>
<t:element title="Favorites"/>

</t:toolbar>

and you will get some like this:

You can add images and access keys for your toolbar. And Images could be swapped:
 


<t:toolbar id="t3">

<t:element title="Stop" imgOff="StopOff.gif" imgOn="StopOn.gif" accessKey="S" onClickLink="http://localhost:8080"/>
<t:element title="Refresh" imgOff="RefreshOff.gif" imgOn="RefreshOn.gif" accessKey="R"/>
<t:element title="Home" imgOff="HomeOff.gif" accessKey="H"/>
<t:element title="Search" imgOff="SearchOff.gif" accessKey="e"/>
<t:element title="Favorites" imgOff="FavoritesOff.gif"/>

</t:toolbar>

and you will get this picture:

As an action for any item you can set your own Javascript function (parameter onClickFunction) or some URL (parameter onClickLink). E.g.:
 


<t:element title="Help" onClickLink="http://myserver/myApp/HelpAction.do"/>
<t:element title="About" onClickFunction="about()"/>

Note: the evaluation version supports up to 5 elements

Tags are:

toolbar

Body tag lets you define a toolbar. Parameters are:

1) id Describes a DHTML (XHTML) id.
2) className Optional parameter. Describes your CSS class.
3) style Optional parameter. Describes a CSS style for your toolbar. Default value is width:600px;background-color:buttonface;padding:2px;
4) orientation Optional parameter. Describes an orientation for your toolbar. Possible values are horizontal or vertical. Default value is horizontal.

element

Body tag lets you define an element in your toolbar. Parameters are:

1) title Describes a caption (title) for element.
2) className Optional parameter. Describes your CSS class.
3) style Optional parameter. Describes a CSS style for your element. Default value is width:60px;border:1px buttonface solid;font-family:MS Sans Serif;font-size:8pt;
4) accessKey Optional parameter. Describes an access key
5) onClickFunction Optional parameter. Describes your own Javascript code
6) onClickLink Optional parameter. Describes your own URL for this element
7) imgOff Optional parameter. Describes a picture for element
8) imgOn Optional parameter. Describes a picture for element in the selected state (when cursor is over).
9) imgWidth Optional parameter. Describes a width for element's image
10) imgHeight Optional parameter. Describes a height for element's image
11) tooltip Optional parameter. Describes a tooltip for this element

for downloading:

Library: toolbartag.jar    Description: taglib.tld

© Coldbeans      Comments?

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

Related links: