Tabbar taglib ver. 1.3

    Custom JSP taglib lets you implement tabbar. It is similar to Tab taglib but the tabs of a tabbar have no content (body). For example, in your JSP page you may have some like this:
 


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

<t:tabbar id="tb1" width="400px">

  <t:tab selected="true" left="0" title="tooltip for tab 1"> Tab 1</t:tab>
  <t:tab left="91" title="tooltip for tab 2"> Tab 2</t:tab>
  <t:tab left="182" script="alert('Hi!');"> Tab 3</t:tab>

</t:tabbar>

and you will get some like this:
 

Tab 1
Tab 2
Tab 3

 

For tabs you may provide your own CSS class (classes). Taglib may use also some default values for CSS parameters.

By default taglib uses the following CSS settings for tabs:
 


position:absolute; cursor:pointer; font-weight: bold; text-align: center; border: 1px;
border-color:#000000; border-style:outset; background-color:#d3d3d3; border-bottom-style:none;
margin:0px;

You may use your own class here of course, but you have to keep this definition position:absolute in your class.

Tags are:

tabbar

Body tag displays a tabbar panel. Parameters are:

1) id own unique name for your panel
2) width width for panel
3) height height for panel
4) activeColor Optional parameter. Describes a color for the selected tab. Default value is #d3d3d3
5) inactiveColor Optional parameter. Describes a color for the inactive tab. Default value is #e8e8e8

tab

Body tag describes an individual tab. Parameters are:

1) selected Optional parameter. Possible values are true or false. Defines a selected panel. Default value is false and the first described panel will be selected.
2) enabled Optional parameter. Possible values are true or false. Describes a possibility to select this panel. Default value is true.
3) className Optional parameter. Describes your own CSS class for this panel. See above about default values
4) script Optional parameter. Describes your own JavaScript code that will be executed when this panel is selected.
5) action Optional parameter. Describes your own action (URL) that will be requested when this panel is selected.
6) width Optional parameter. Describes a width for this tab. Default value is 90px
7) height Optional parameter. Describes a height for this tab. Default value is 30px
8) left Optional parameter. Describes a left coordinate for this tab (in pixels). Default value is 0 for the first tab and for the each next it will be calculated automatically by tab's width.
9) title Optional parameter. Describes a tooltip for this tab. By default is empty.

Note: the evaluation version supports up to 3 tabs

for downloading:

Library: tabbartag.jar    Description: taglib.tld

 © Coldbeans Software      Comments?

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

Related links: