public class Menu extends AbstractTopicsBean
Renders a menu.
Examples
Menu with Items
<sj:menu id="menuWithItems" cssStyle="width:50%">
<sj:menuItem title="Struts2" href="http://struts.apache.org/2.x/index.html"/>
<sj:menuItem title="Struts2 jQuery News" href="http://www.jgeppert.com/category/java/struts2-jquery/"/>
<sj:menuItem title="Struts2 Plugins">
<sj:menu id="subMenuPlugins">
<sj:menuItem title="Struts2 Plugins" href="https://cwiki.apache.org/S2PLUGINS/home.html"/>
<sj:menuItem title="Struts2 jQuery Plugin" href="http://code.google.com/p/struts2-jquery/"/>
<sj:menuItem title="Struts2 Bootstrap Plugin" href="http://code.google.com/p/struts2-jquery/"/>
</sj:menu>
</sj:menuItem>
<sj:menuItem title="Struts2 @ Social Media">
<sj:menu id="subMenuSocialMedia">
<sj:menuItem title="Struts2 @ Twitter" href="https://twitter.com/TheApacheStruts"/>
<sj:menuItem title="Struts2 @ Google+" href="https://www.google.com/+ApacheStruts"/>
<sj:menuItem title="Struts2 @ Facebook" href="http://www.facebook.com/struts2"/>
</sj:menu>
</sj:menuItem>
<sj:menuItem title="AJAX">
<sj:menu id="subMenuAjax">
<s:url var="ajax1" value="/ajax1.action"/>
<sj:menuItem title="Ajax 1" href="%{ajax1}" targets="result"/>
<s:url var="ajax2" value="/ajax2.action"/>
<sj:menuItem title="Ajax 2" href="%{ajax2}" targets="result" effect="highlight" effectDuration="2500"/>
<s:url var="ajax3" value="/ajax3.action"/>
<sj:menuItem title="Ajax 3" href="%{ajax3}" targets="result" onBeforeTopics="beforeLink" onCompleteTopics="completeLink"/>
<s:url var="ajax4" value="/ajax4.action"/>
<sj:menuItem title="Ajax 4" href="%{ajax4}" targets="result" effect="bounce" effectDuration="1000"/>
</sj:menu>
</sj:menuItem>
</sj:menu>
<br/>
<strong>Result Div :</strong>
<div id="result" class="result ui-widget-content ui-corner-all">Click on the AJAX Links above.</div>
| Modifier and Type | Field and Description |
|---|---|
static String |
COMPONENT_NAME |
protected String |
disabled |
protected String |
href |
static String |
JQUERYACTION |
protected Object |
list |
protected String |
listKey |
protected String |
listValue |
protected String |
paramName |
protected String |
targets |
static String |
TEMPLATE |
static String |
TEMPLATE_CLOSE |
protected boolean |
throwExceptionOnNullValueAttribute |
onAfterValidationTopics, onAlwaysTopics, onBeforeTopics, onBlurTopics, onChangeTopics, onCompleteTopics, onDisableTopics, onEnableTopics, onErrorTopics, onFocusTopics, onSuccessTopicsaccesskey, cssClass, cssErrorClass, cssErrorStyle, cssStyle, defaultTemplateDir, defaultUITheme, 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, standardAttributesMap, tabindex, template, templateDir, templateEngineManager, templateSuffix, theme, title, tooltip, tooltipConfig, tooltipCssClass, tooltipDelay, tooltipIconPath, value| Constructor and Description |
|---|
Menu(com.opensymphony.xwork2.util.ValueStack stack,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
| Modifier and Type | Method and Description |
|---|---|
void |
evaluateExtraParams() |
String |
getDefaultOpenTemplate() |
protected String |
getDefaultTemplate() |
String |
getTheme() |
void |
setDisabled(String disabled) |
void |
setHref(String href) |
void |
setList(Object list) |
void |
setListKey(String listKey) |
void |
setListValue(String listValue) |
void |
setParamName(String paramName) |
void |
setTargets(String targets) |
void |
setTheme(String theme) |
setOnAfterValidationTopics, setOnAlwaysTopics, setOnBeforeTopics, setOnBlurTopics, setOnChangeTopics, setOnCompleteTopics, setOnDisableTopics, setOnEnableTopics, setOnErrorTopics, setOnFocusTopics, setOnSuccessTopicsaddFormParameter, buildTemplateName, copyParams, enableAncestorFormCustomOnsubmit, end, ensureAttributeSafelyNotEscaped, escape, evaluateNameValue, evaluateParams, getId, getStandardAttributes, getTemplate, getTemplateDir, getTooltipConfig, getValueClassType, mergeTemplate, populateComponentHtmlId, setAccesskey, setCssClass, setCssErrorClass, setCssErrorStyle, setCssStyle, setDefaultTemplateDir, setDefaultUITheme, setDynamicAttributes, setId, 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, setValueaddAllParameters, addParameter, altSyntax, completeExpressionIfAltSyntax, determineActionURL, determineNamespace, end, fieldError, findAncestor, findString, findString, findStringIfAltSyntax, findValue, findValue, findValue, getComponentStack, getParameters, getStack, popComponentStack, setActionMapper, setThrowExceptionsOnELFailure, setUrlHelper, stripExpressionIfAltSyntax, toString, usesBodypublic static final String JQUERYACTION
public static final String TEMPLATE
public static final String TEMPLATE_CLOSE
public static final String COMPONENT_NAME
protected boolean throwExceptionOnNullValueAttribute
protected String disabled
protected String targets
protected String href
protected String paramName
protected Object list
protected String listKey
protected String listValue
public Menu(com.opensymphony.xwork2.util.ValueStack stack,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
public String getDefaultOpenTemplate()
getDefaultOpenTemplate in class org.apache.struts2.components.ClosingUIBeanprotected String getDefaultTemplate()
getDefaultTemplate in class org.apache.struts2.components.UIBeanpublic void evaluateExtraParams()
evaluateExtraParams in class AbstractTopicsBeanpublic void setTheme(String theme)
setTheme in class org.apache.struts2.components.UIBeanpublic String getTheme()
getTheme in class org.apache.struts2.components.UIBeanpublic void setDisabled(String disabled)
setDisabled in class org.apache.struts2.components.UIBeanpublic void setTargets(String targets)
public void setList(Object list)
public void setListKey(String listKey)
public void setListValue(String listValue)
public void setHref(String href)
public void setParamName(String paramName)
Copyright © 2013. All Rights Reserved.