|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.jsp.tagext.TagSupport net.sf.basedb.clients.web.taglib.tab.TabControl
public class TabControl
This is the main tag for the tab control. It must always be present as the
outermost tag. Use one or more Tab
tags to define each tab inside the
tabcontrol.
Syntax:
<t:tabcontrol id=... clazz=... style=... contentstyle=... width=... active=... switch=... position=... autoheight=true|false 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 | 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 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.
|
width | - | no | The width of the tab control. |
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. |
switch | setActiveTab | no |
The name of the javascript method to call to switch tabs. The function
should take two parameters which is the ID of the tabcontrol and the ID of the
tab that should become active. Note! If validation is required the javascript method
should call the validateActiveTab(tabControlId)
method. It is not done automatically.
|
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 .
|
autoheight | true | no |
If the tab control should try to automatically adjust the height of the tab content
area when the window is resized. This functionality replaces the
window.onresize event handler. If an existing event handler exists
it will be saved as window.oldOnresize and invoked before the
tabs are resized.
|
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 FormField Summary | |
---|---|
private String |
active
The ID attribute of the active tab. |
private boolean |
autoAdjustHeight
If tab height should be automatically adjusted or not. |
static int |
BOTTOM
Tabs are at the bottom of the tab control. |
private String |
clazz
Optional class attribute. |
private StringBuilder |
content
The HTML for the contents of the tabs. |
private String |
contentStyle
Optional style attribute for the content section |
private ExtensionsInvoker<TabAction> |
extensions
|
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 StringBuilder |
script
JavaScript for initialising the tabcontrol |
private static long |
serialVersionUID
|
private String |
startActive
The real ID of the tab that is initially active. |
private String |
style
Optional style attribute |
private String |
switchtab
The JavaScript method to call to change tabs. |
private StringBuilder |
tabs
The HTML for the tabs. |
static int |
TOP
Tabs are at the top of the tab control. |
private String |
width
The width of the tab control. |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
id, pageContext |
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 | |
---|---|
TabControl()
|
Method Summary | |
---|---|
(package private) void |
addTab(TabAction tab)
|
int |
doEndTag()
|
int |
doStartTag()
|
String |
getActive()
|
String |
getClazz()
|
String |
getContentstyle()
|
String |
getStyle()
|
String |
getSwitch()
|
String |
getWidth()
|
void |
render(TabAction action)
Render the action in the client application. |
void |
setActive(String active)
|
void |
setAutoheight(boolean auto)
|
void |
setClazz(String clazz)
|
void |
setContentstyle(String contentStyle)
|
void |
setExtensions(ExtensionsInvoker<TabAction> extensions)
|
void |
setNotabs(boolean noTabs)
|
void |
setPosition(String position)
|
void |
setRemember(boolean remember)
|
void |
setStyle(String style)
|
void |
setSwitch(String s)
|
void |
setWidth(String width)
|
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private String clazz
class
attribute.
private String style
style
attribute
private String contentStyle
style
attribute for the content section
private String width
private String active
private String switchtab
private int position
private boolean remember
private boolean autoAdjustHeight
private boolean noTabs
private ExtensionsInvoker<TabAction> extensions
private String startActive
private int numTabs
private StringBuilder tabs
private StringBuilder content
private StringBuilder script
public static final int TOP
public static final int BOTTOM
Constructor Detail |
---|
public TabControl()
Method Detail |
---|
public void setClazz(String clazz)
public String getClazz()
public void setStyle(String style)
public String getStyle()
public void setContentstyle(String contentStyle)
public String getContentstyle()
public void setWidth(String width)
public String getWidth()
public void setActive(String active)
public String getActive()
public void setSwitch(String s)
public String getSwitch()
public void setPosition(String position)
public void setAutoheight(boolean auto)
public void setNotabs(boolean noTabs)
public void setExtensions(ExtensionsInvoker<TabAction> extensions)
public void setRemember(boolean remember)
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
public void render(TabAction action)
Renderer
render
in interface Renderer<TabAction>
action
- The action to render
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |