public class Head
extends org.apache.struts2.components.Head
The "head" tag renders required JavaScript code to configure jQuery and is required in order to use any of the tags included in the jQuery plugin.
Some tags like the "datepicker" can use different locales, to use a locale that is different from the request locale.
The "locale" attribute configures jQuery locale for datepicker. Default is "en" you can use all locales that are bundled with jQuery. e.g. "de, "fr", " ja", ...
Examples
<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> <head> <title>My page</title> <sj:head/> </head>
<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> <head> <title>My page</title> <sj:head compressed="false" locale="de" jquerytheme="cupertino"/> </head>
| Modifier and Type | Field | Description |
|---|---|---|
protected String |
ajaxcache |
|
protected String |
ajaxhistory |
|
protected String |
compressed |
|
protected String |
customBasepath |
|
protected String |
debug |
|
protected String |
defaultErrorText |
|
protected String |
defaultIndicator |
|
protected String |
defaultLoadingText |
|
protected String |
jquery |
|
protected String |
jquerytheme |
|
protected String |
jqueryui |
|
protected String |
loadAtOnce |
|
protected String |
loadFromGoogle |
|
protected String |
locale |
|
protected String |
scriptPath |
|
static String |
TEMPLATE |
actionMapper, COMPONENT_STACK, devMode, parameters, stack, standardAttributesMap, throwExceptionOnELFailureaccesskey, cssClass, cssErrorClass, cssErrorStyle, cssStyle, defaultTemplateDir, defaultUITheme, disabled, dynamicAttributes, errorPosition, id, javascriptTooltip, key, label, labelPosition, labelSeparator, name, onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onselect, request, requiredLabel, requiredPosition, response, tabindex, template, templateDir, templateEngineManager, templateSuffix, theme, title, tooltip, tooltipConfig, tooltipCssClass, tooltipDelay, tooltipIconPath, uiThemeExpansionToken, value| Constructor | Description |
|---|---|
Head(com.opensymphony.xwork2.util.ValueStack stack,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
evaluateParams() |
|
protected String |
getDefaultTemplate() |
|
String |
getTheme() |
|
boolean |
isJqueryui() |
|
void |
setAjaxcache(String ajaxcache) |
|
void |
setAjaxhistory(String ajaxhistory) |
|
void |
setCompressed(String compressed) |
|
void |
setCustomBasepath(String customBasepath) |
|
void |
setDebug(String debug) |
|
void |
setDefaultErrorText(String defaultErrorText) |
|
void |
setDefaultIndicator(String defaultIndicator) |
|
void |
setDefaultLoadingText(String defaultLoadingText) |
|
void |
setDefaultLocale(String val) |
|
void |
setJquery(String jquery) |
|
void |
setJquerytheme(String jquerytheme) |
|
void |
setJqueryui(String jqueryui) |
|
void |
setLoadAtOnce(String loadAtOnce) |
|
void |
setLoadFromGoogle(String loadFromGoogle) |
|
void |
setLocale(String locale) |
|
void |
setScriptPath(String scriptPath) |
|
void |
setTheme(String theme) |
addAllParameters, addParameter, altSyntax, completeExpressionIfAltSyntax, determineActionURL, determineNamespace, end, fieldError, findAncestor, findString, findString, findStringIfAltSyntax, findValue, findValue, findValue, getComponentStack, getParameters, getStack, getStandardAttributes, isValidTagAttribute, popComponentStack, setActionMapper, setDevMode, setThrowExceptionsOnELFailure, setUrlHelper, start, stripExpressionIfAltSyntax, toString, usesBodyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddFormParameter, buildTemplateName, copyParams, enableAncestorFormCustomOnsubmit, end, ensureAttributeSafelyNotEscaped, escape, evaluateExtraParams, evaluateNameValue, getId, getTemplate, getTemplateDir, getTooltipConfig, getValueClassType, mergeTemplate, populateComponentHtmlId, setAccesskey, setClass, setCssClass, setCssErrorClass, setCssErrorStyle, setCssStyle, setDefaultTemplateDir, setDefaultUITheme, setDisabled, setDynamicAttributes, setErrorPosition, setId, setJavascriptTooltip, setKey, setLabel, setLabelposition, setLabelSeparator, setName, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setRequiredLabel, setRequiredPosition, setStyle, setTabindex, setTemplate, setTemplateDir, setTemplateEngineManager, setTitle, setTooltip, setTooltipConfig, setTooltipCssClass, setTooltipDelay, setTooltipIconPath, setUIThemeExpansionToken, setValuepublic static final String TEMPLATE
protected String compressed
protected String locale
protected String jquery
protected String jquerytheme
protected String jqueryui
protected String customBasepath
protected String loadFromGoogle
protected String ajaxcache
protected String ajaxhistory
protected String defaultIndicator
protected String defaultLoadingText
protected String defaultErrorText
protected String loadAtOnce
protected String debug
protected String scriptPath
public Head(com.opensymphony.xwork2.util.ValueStack stack,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
protected String getDefaultTemplate()
getDefaultTemplate in class org.apache.struts2.components.Headpublic void evaluateParams()
evaluateParams in class org.apache.struts2.components.Headpublic void setDefaultLocale(String val)
public void setTheme(String theme)
setTheme in class org.apache.struts2.components.UIBeanpublic String getTheme()
getTheme in class org.apache.struts2.components.UIBeanpublic void setJquery(String jquery)
public boolean isJqueryui()
public void setJqueryui(String jqueryui)
public void setCompressed(String compressed)
public void setJquerytheme(String jquerytheme)
public void setLocale(String locale)
public void setCustomBasepath(String customBasepath)
public void setLoadFromGoogle(String loadFromGoogle)
public void setAjaxcache(String ajaxcache)
public void setAjaxhistory(String ajaxhistory)
public void setDefaultIndicator(String defaultIndicator)
public void setDefaultLoadingText(String defaultLoadingText)
public void setDefaultErrorText(String defaultErrorText)
public void setLoadAtOnce(String loadAtOnce)
public void setDebug(String debug)
public void setScriptPath(String scriptPath)
Copyright © 2018. All rights reserved.