2.8.1: 2008-09-10

net.sf.basedb.clients.web.taglib.tab
Class Tab

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by net.sf.basedb.clients.web.taglib.tab.Tab
All Implemented Interfaces:
Serializable, BodyTag, IterationTag, JspTag, Tag

public class Tab
extends BodyTagSupport

This tag defines the title and contents of a single tab inside a tab control.

Syntax:

   <t:tab
      id=...
      style=...
      title=...
      tooltip=...
      validate=...
      visible=true|false
      helpid=...
   >

Attribute Default value Required Description
id tabcontrol1 yes The ID of the tab. The value of this attribute goes directly into the standard HTML id attribute. This means that if you need a reference to the tab object in your own JavaScript code, you may for example use the following code:

tab = document.getElementById('<id>');

style - no The value if this attribute goes directly into the standard HTML style attribute. This allows you to apply different styles to different notes.
title - yes The title of the tab.
tooltip - no An optional tooltip that is shown as a popup text while the user is pointing the mouse over the tab's title. Not supported by all browsers.
validate - no An optional JavaScript expression that will be evaluated when the users tries to switch from this tab to another. If the expression returns FALSE the switch will not be made. You may, for example, use this attribute to validate input data in a form.
visible true no If this tab should be visible or not.
helpid no Optional ID for the help text associated with this tab. See the Help taglib for more information.

Version:
2.0
Author:
Nicklas
See Also:
TabControl, Serialized Form

Field Summary
private  String helpid
          The help ID for this tab.
private static long serialVersionUID
           
private  String style
          Optional style attribute
private  TabControl tc
          The parent TabControl object.
private  String title
          The title of the tab.
private  String tooltip
          A popup tooltip text.
private  String validate
          A JavaScript method that validates the tab content.
private  boolean visible
          If the tab should be visible or not.
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
Tab()
           
 
Method Summary
 int doEndTag()
           
 int doStartTag()
           
 String getHelpid()
           
 String getStyle()
           
 String getTitle()
           
 String getTooltip()
           
 String getValidate()
           
 boolean isVisible()
           
 void setHelpid(String helpid)
           
 void setStyle(String style)
           
 void setTitle(String title)
           
 void setTooltip(String tooltip)
           
 void setValidate(String validate)
           
 void setVisible(boolean visible)
           
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doInitBody, getBodyContent, getPreviousOut, release, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

tc

private TabControl tc
The parent TabControl object.


style

private String style
Optional style attribute


title

private String title
The title of the tab.


tooltip

private String tooltip
A popup tooltip text.


validate

private String validate
A JavaScript method that validates the tab content.


visible

private boolean visible
If the tab should be visible or not.


helpid

private String helpid
The help ID for this tab.

Constructor Detail

Tab

public Tab()
Method Detail

setStyle

public void setStyle(String style)

getStyle

public String getStyle()

setTitle

public void setTitle(String title)

getTitle

public String getTitle()

setTooltip

public void setTooltip(String tooltip)

getTooltip

public String getTooltip()

setValidate

public void setValidate(String validate)

getValidate

public String getValidate()

setVisible

public void setVisible(boolean visible)

isVisible

public boolean isVisible()

setHelpid

public void setHelpid(String helpid)

getHelpid

public String getHelpid()

doStartTag

public int doStartTag()
               throws JspException
Specified by:
doStartTag in interface Tag
Overrides:
doStartTag in class BodyTagSupport
Throws:
JspException

doEndTag

public int doEndTag()
             throws JspException
Specified by:
doEndTag in interface Tag
Overrides:
doEndTag in class BodyTagSupport
Throws:
JspException

2.8.1: 2008-09-10