Class Tab
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
net.sf.basedb.clients.web.taglib.tab.Tab
- All Implemented Interfaces:
Serializable
,BodyTag
,DynamicAttributes
,IterationTag
,JspTag
,Tag
,DynamicActionAttributes
,TabAction
,Action
public class Tab
extends BodyTagSupport
implements TabAction, DynamicAttributes, DynamicActionAttributes
This tag defines the title and contents of a single tab inside a tab control.
Syntax:
<t:tab id=... clazz=... style=... title=... tooltip=... visible=true|false helpid=... tabindex=... >
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:
|
clazz | button | no |
The value if this attribute goes directly into the standard HTML
class attribute. This allows you to apply different styles
to different tables.
|
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. |
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.
|
|
tabindex | 0 | no | Tab index value to control the focus order. Use -1 to disable tabbing. |
- Version:
- 2.0
- Author:
- Nicklas
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprivate String
Optionalclass
attribute.private Map<String,
DynamicActionAttribute> private String
The help ID for this tab.private static final long
private String
Optionalstyle
attributeprivate int
private TabControl
The parent TabControl object.private String
The title of the tab.private String
A popup tooltip text.private boolean
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
-
Method Summary
Modifier and TypeMethodDescriptionint
doEndTag()
int
getClazz()
Class attribute of the main tab tag.Get the (HTML) contents of the tab.Get an iterator that return all dynamic attributes.The external id of a help text that the user can display to get more information about how to use the information in this tab.getStyle()
Extra CSS style attributes that will be added to thestyle
attribute of the main tab tag.int
int
Get the tab index used to control focus order when tabbing.getTitle()
Get the title of the tab.A tooltip that is shown as a yellow popup when the user points the mouse at the tab.boolean
If the tab should be visible or not.void
void
setDynamicAttribute
(String uri, String name, Object value) void
void
setPageContext
(PageContext pageContext) Reset the dynamic attributes to make sure old ones are not included in case the tag object is reused.void
void
setTabindex
(int tabIndex) void
void
setTooltip
(String tooltip) 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, setParent, setValue
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
tc
The parent TabControl object. -
dynamicAttributes
-
clazz
Optionalclass
attribute.- Since:
- 2.17
-
style
Optionalstyle
attribute -
title
The title of the tab. -
tooltip
A popup tooltip text. -
visible
private boolean visibleIf the tab should be visible or not. -
helpid
The help ID for this tab. -
tabIndex
private int tabIndex
-
-
Constructor Details
-
Tab
public Tab()
-
-
Method Details
-
setClazz
- Since:
- 2.17
-
getClazz
Description copied from interface:TabAction
Class attribute of the main tab tag. -
setStyle
-
getStyle
Description copied from interface:TabAction
Extra CSS style attributes that will be added to thestyle
attribute of the main tab tag. -
setTitle
-
getTitle
Description copied from interface:TabAction
Get the title of the tab. -
setTooltip
-
getTooltip
Description copied from interface:TabAction
A tooltip that is shown as a yellow popup when the user points the mouse at the tab.- Specified by:
getTooltip
in interfaceTabAction
- Returns:
- The tooltip or null to not display any tooltip
-
setVisible
public void setVisible(boolean visible) -
isVisible
public boolean isVisible()Description copied from interface:TabAction
If the tab should be visible or not. -
setHelpid
-
getHelpid
-
setTabindex
public void setTabindex(int tabIndex) -
getTabindex
public int getTabindex() -
setDynamicAttribute
- Specified by:
setDynamicAttribute
in interfaceDynamicAttributes
- Throws:
JspException
-
getDynamicActionAttributes
Description copied from interface:DynamicActionAttributes
Get an iterator that return all dynamic attributes. If no dynamic attributes have been defined, the method may return null or an iterator that doesn't return any elements.- Specified by:
getDynamicActionAttributes
in interfaceDynamicActionAttributes
- Returns:
- An iterator or null
-
setPageContext
Reset the dynamic attributes to make sure old ones are not included in case the tag object is reused.- Specified by:
setPageContext
in interfaceTag
- Overrides:
setPageContext
in classTagSupport
- Since:
- 3.10
-
doStartTag
- Specified by:
doStartTag
in interfaceTag
- Overrides:
doStartTag
in classBodyTagSupport
- Throws:
JspException
-
doEndTag
- Specified by:
doEndTag
in interfaceTag
- Overrides:
doEndTag
in classBodyTagSupport
- Throws:
JspException
-
getHelpId
Description copied from interface:TabAction
The external id of a help text that the user can display to get more information about how to use the information in this tab. SeeHelp.getExternalId()
. -
getTabIndex
public int getTabIndex()Description copied from interface:TabAction
Get the tab index used to control focus order when tabbing. Use -1 to disable.- Specified by:
getTabIndex
in interfaceTabAction
-
getContent
Description copied from interface:TabAction
Get the (HTML) contents of the tab.- Specified by:
getContent
in interfaceTabAction
-