public class TabControl extends StylableTag implements Renderer<TabAction>
Tab
tags to define each tab inside the
tabcontrol.
Syntax:
<t:tabcontrol id=... clazz=... subclass=... style=... contentstyle=... active=... position=... notabs=true|false extensions=... >
Attribute | Default value | Required | Description |
id | - | yes | The ID of the tab control. The value of this attribute
goes directly into the standard id attribute.
This means that if you need a reference to the tab control object in your own
JavaScript code, you may for example use the following code:
|
clazz | tabcontrol | no |
The value if this attribute goes directly into the standard HTML
class attribute. This allows you to apply different styles
to different tables.
|
subclass | - | no | Additional classes to put in the HTML class attribute. Doesn't replace the main class attribute. |
style | - | no |
The value if this attribute goes directly into the standard HTML
style attribute. This allows you to apply different styles
to different tabcontrols.
|
contentstyle | - | no |
The value if this attribute goes directly into the standard HTML
style attribute for the content section. This allows you to apply
different styles to different tabcontrols.
|
active | - | no | The id of the tab that should be active to begin with. If no value is specified the first tab is automatically made active. |
position | top | no | The position of the tabs in relation to the content. The default value is to display
the tabs at the top. The only other allowed value is bottom .
|
notabs | false | no | If the tabcontrol should display tabs or not. If false the tab control will not output any HTML except the contents of the active tab. |
extensions | - | no |
An ExtensionsInvoker for TabAction extensions. All
actions will be rendered by this tabcontrol after all the
normally defined tags have been rendered. Since BASE 2.17.
|
Tab
,
Serialized FormModifier and Type | Field and Description |
---|---|
private java.lang.String |
active
The ID attribute of the active tab.
|
static int |
BOTTOM
Tabs are at the bottom of the tab control.
|
private java.lang.StringBuilder |
content
The HTML for the contents of the tabs.
|
private java.lang.String |
contentStyle
Optional
style attribute for the content section |
private ExtensionsInvoker<TabAction> |
extensions |
private java.lang.String |
initialTab
The ID of the tab that is initially active.
|
private boolean |
noTabs
If the tabs should be displayed or not.
|
private int |
numTabs
The number of tabs.
|
private int |
position
The position of the tabs.
|
private boolean |
remember
If it should try to remember the last active tab on the page
|
private static long |
serialVersionUID |
private java.lang.StringBuilder |
tabs
The HTML for the tabs.
|
static int |
TOP
Tabs are at the top of the tab control.
|
id, pageContext
EVAL_BODY_AGAIN
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
Constructor and Description |
---|
TabControl() |
Modifier and Type | Method and Description |
---|---|
(package private) void |
addTab(TabAction tab) |
int |
doEndTag() |
int |
doStartTag() |
java.lang.String |
getActive() |
java.lang.String |
getContentstyle() |
void |
render(TabAction action)
Render the action in the client application.
|
void |
setActive(java.lang.String active) |
void |
setContentstyle(java.lang.String contentStyle) |
void |
setExtensions(ExtensionsInvoker<TabAction> extensions) |
void |
setNotabs(boolean noTabs) |
void |
setPosition(java.lang.String position) |
void |
setRemember(boolean remember) |
addDynamicAttributes, addIdAndStyles, getClazz, getDynamicActionAttributes, getDynamicAttribute, getFullClass, getIdPrefix, getStyle, getSubclass, initDefaultAttributes, setClazz, setDynamicAttribute, setMoreDynamicAttributes, setPageContext, setStyle, setSubclass
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setParent, setValue
private static final long serialVersionUID
private java.lang.String contentStyle
style
attribute for the content sectionprivate java.lang.String active
private int position
private boolean remember
private boolean noTabs
private ExtensionsInvoker<TabAction> extensions
private java.lang.String initialTab
private int numTabs
private java.lang.StringBuilder tabs
private java.lang.StringBuilder content
public static final int TOP
public static final int BOTTOM
public void setContentstyle(java.lang.String contentStyle)
public java.lang.String getContentstyle()
public void setActive(java.lang.String active)
public java.lang.String getActive()
public void setPosition(java.lang.String position)
public void setExtensions(ExtensionsInvoker<TabAction> extensions)
public void setRemember(boolean remember)
public void setNotabs(boolean noTabs)
void addTab(TabAction tab)
public int doStartTag() throws JspException
doStartTag
in interface Tag
doStartTag
in class TagSupport
JspException
public int doEndTag() throws JspException
doEndTag
in interface Tag
doEndTag
in class TagSupport
JspException