org.apache.struts2.dojo.components
Class TabbedPanel
java.lang.Object
org.apache.struts2.components.Component
org.apache.struts2.components.UIBean
org.apache.struts2.components.ClosingUIBean
org.apache.struts2.dojo.components.TabbedPanel
public class TabbedPanel
- extends ClosingUIBean
The tabbedpanel widget is primarily an AJAX component, where each tab can either be local content or remote
content (refreshed each time the user selects that tab).
If the useSelectedTabCookie attribute is set to true, the id of the selected tab is saved in a cookie on activation.
When coming back to this view, the cookie is read and the tab will be activated again, unless an actual value for the
selectedTab attribute is specified.
If you want to use the cookie feature, please be sure that you provide a unique id for your tabbedpanel component,
since this will also be the identifying name component of the stored cookie.
Examples
<sx:head />
<sx:tabbedpanel id="test" >
<sx:div id="one" label="one" theme="ajax" labelposition="top" >
This is the first pane<br/>
<s:form>
<s:textfield name="tt" label="Test Text"/> <br/>
<s:textfield name="tt2" label="Test Text2"/>
</s:form>
</sx:div>
<sx:div id="three" label="remote" theme="ajax" href="/AjaxTest.action" >
This is the remote tab
</sx:div>
</sx:tabbedpanel>
<sx:head />
<script type="text/javascript">
dojo.event.topic.subscribe("/beforeSelect", function(event, tab, tabContainer){
event.cancel = true;
});
</script>
<sx:tabbedpanel id="test" beforeSelectTabNotifyTopics="/beforeSelect">
<sx:div id="three" label="remote" theme="ajax" href="/AjaxTest.action" >
One Tab
</sx:div>
<sx:div id="three" label="remote" theme="ajax" href="/AjaxTest.action" >
Another tab
</sx:div>
</sx:tabbedpanel>
Fields inherited from class org.apache.struts2.components.UIBean |
accesskey, cssClass, cssErrorClass, cssErrorStyle, cssStyle, defaultTemplateDir, defaultUITheme, disabled, dynamicAttributes, id, javascriptTooltip, key, label, labelPosition, labelSeparator, name, onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onselect, request, required, requiredposition, response, tabindex, template, templateDir, templateEngineManager, templateSuffix, theme, title, tooltip, tooltipConfig, tooltipCssClass, tooltipDelay, tooltipIconPath, value |
Constructor Summary |
TabbedPanel(ValueStack stack,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
Methods inherited from class org.apache.struts2.components.UIBean |
addFormParameter, buildTemplateName, enableAncestorFormCustomOnsubmit, end, ensureAttributeSafelyNotEscaped, escape, evaluateNameValue, evaluateParams, getId, getTemplate, getTemplateDir, getTooltipConfig, getValueClassType, mergeTemplate, populateComponentHtmlId, setAccesskey, setCssClass, setCssErrorClass, setCssErrorStyle, setCssStyle, setDefaultTemplateDir, setDefaultUITheme, setDisabled, setDynamicAttributes, setJavascriptTooltip, setKey, setLabel, setLabelposition, setLabelSeparator, setName, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setRequired, setRequiredposition, setTabindex, setTemplate, setTemplateDir, setTemplateEngineManager, setTitle, setTooltip, setTooltipConfig, setTooltipCssClass, setTooltipDelay, setTooltipIconPath, setValue |
Methods inherited from class org.apache.struts2.components.Component |
addAllParameters, addParameter, altSyntax, altSyntax, completeExpressionIfAltSyntax, copyParams, determineActionURL, determineNamespace, end, fieldError, findAncestor, findString, findString, findStringIfAltSyntax, findValue, findValue, findValue, getComponentStack, getParameters, getStack, popComponentStack, setActionMapper, setThrowExceptionsOnELFailure, stripExpressionIfAltSyntax, stripExpressionIfAltSyntax, toString, usesBody |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TEMPLATE
public static final java.lang.String TEMPLATE
- See Also:
- Constant Field Values
TEMPLATE_CLOSE
public static final java.lang.String TEMPLATE_CLOSE
- See Also:
- Constant Field Values
selectedTab
protected java.lang.String selectedTab
closeButton
protected java.lang.String closeButton
doLayout
protected java.lang.String doLayout
templateCssPath
protected java.lang.String templateCssPath
beforeSelectTabNotifyTopics
protected java.lang.String beforeSelectTabNotifyTopics
afterSelectTabNotifyTopics
protected java.lang.String afterSelectTabNotifyTopics
disabledTabCssClass
protected java.lang.String disabledTabCssClass
useSelectedTabCookie
protected java.lang.String useSelectedTabCookie
TabbedPanel
public TabbedPanel(ValueStack stack,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
evaluateExtraParams
protected void evaluateExtraParams()
- Overrides:
evaluateExtraParams
in class UIBean
setTheme
public void setTheme(java.lang.String theme)
- Overrides:
setTheme
in class UIBean
getTheme
public java.lang.String getTheme()
- Overrides:
getTheme
in class UIBean
getDefaultOpenTemplate
public java.lang.String getDefaultOpenTemplate()
- Specified by:
getDefaultOpenTemplate
in class ClosingUIBean
getDefaultTemplate
protected java.lang.String getDefaultTemplate()
- Specified by:
getDefaultTemplate
in class UIBean
getComponentName
public java.lang.String getComponentName()
setId
public void setId(java.lang.String id)
- Overrides:
setId
in class UIBean
setSelectedTab
public void setSelectedTab(java.lang.String selectedTab)
setCloseButton
public void setCloseButton(java.lang.String closeButton)
setDoLayout
public void setDoLayout(java.lang.String doLayout)
setTemplateCssPath
public void setTemplateCssPath(java.lang.String templateCssPath)
setBeforeSelectTabNotifyTopics
public void setBeforeSelectTabNotifyTopics(java.lang.String selectedTabNotifyTopics)
setAfterSelectTabNotifyTopics
public void setAfterSelectTabNotifyTopics(java.lang.String afterSelectTabNotifyTopics)
setDisabledTabCssClass
public void setDisabledTabCssClass(java.lang.String disabledTabCssClass)
setUseSelectedTabCookie
public void setUseSelectedTabCookie(java.lang.String useSelectedTabCookie)
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.