Custom JSP taglib lets you implement tabbed panels. For example, in
your JSP page you may have some like this:
<%@ taglib uri="taglib.tld" prefix="t" %> <t:tabpanel id="panel1" width="400px" height="300px">
and you will get some like this:
your JSP code for panel 1
Tab 1
your JSP code for panel 2
Tab 2
your JSP code for panel 3
Tab 3
Tabbed panel is a set of individual panels. Each panel has got a tab (caption) and a body (content). For tabs and panels 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. By default taglib uses the following CSS settings for panels:
position:absolute; border: 1px; border-color:#000000; background-color:#d3d3d3; border-style:outset; left:0px; top:28px; margin:0px; padding:6px; You may use your own class here too, but you have to keep this definition position:absolute in your class. Content for individual panel could be set as a body of panelBody tag or as a
parameter src for this tag. For example, you could do so:
<t:panelBody src="mypage.jsp"/> or so: <t:panelBody> <jsp:include page="mypage.jsp"/> </t:panelBody> Tag selectPanel lets you set a selected panel. You can use this tag in the body of tabpanel or outside it (in this case parameter id describes a tabpanel). Tags are: tabpanel Body tag displays a tabbed panel. Parameters are: 1) id own unique name for your panel
panel Body tag describes an individual panel. 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.
panelTab Body tag describes a tab (caption) for some individual panel. Parameters are: 1) className Optional parameter. Describes your
own CSS class for this tab. See above about default values
panelBody Body tag describes a body (content) for some individual panel. Parameters are: 1) className Optional parameter. Describes your
own CSS class for this content.
selectPanel Body tag generates a JavaScript code for panel selection. Body describes a number for the selected panel (starts from 1). Parameters are: 1) id Optional parameter. Describes id for panel.
Note: the evaluation version supports up to 3 panels for downloading: Library: tabtag.jar Description: taglib.tld © Coldbeans Software Comments? Buy this component here See also Coldtags suite - the largest collection of custom JSP tags.
|
Also in Coldtags:
|