public class Div extends AbstractRemoteBean
This tag generates an HTML div that loads its content using an XMLHttpRequest call, via the dojo framework. When the "updateFreq" is set the built in timer will start automatically and reload the div content with the value of "updateFreq" as the refresh period(in milliseconds). Topics can be used to stop(stopTimerListenTopics) and start(startTimerListenTopics) this timer.
When used inside a "tabbedpanel" tag, each div becomes a tab. Some attributes are specific to this use case, like:
Examples
<sx:div href="%{#url}">Initial Content</sx:div> <img id="indicator" src="${pageContext.request.contextPath}/images/indicator.gif" style="display:none"/> <sx:div href="%{#url}" updateFreq="2000" indicator="indicator"> Initial Content </sx:div> <form id="form"> <label for="textInput">Text to be submited when div reloads</label> <input type=textbox id="textInput" name="data"> </form> <sx:div href="%{#url}" updateFreq="3000" listenTopics="/refresh" startTimerListenTopics="/startTimer" stopTimerListenTopics="/stopTimer" highlightColor="red" formId="form"> Initial Content </sx:div>| Modifier and Type | Field and Description |
|---|---|
protected String |
autoStart |
protected String |
closable |
static String |
COMPONENT_NAME |
protected String |
delay |
protected String |
preload |
protected String |
refreshOnShow |
protected String |
startTimerListenTopics |
protected String |
stopTimerListenTopics |
static String |
TEMPLATE |
static String |
TEMPLATE_CLOSE |
protected String |
updateFreq |
afterNotifyTopics, beforeNotifyTopics, errorNotifyTopics, errorText, executeScripts, formFilter, formId, handler, highlightColor, highlightDuration, href, indicator, listenTopics, loadingText, notifyTopics, parseContent, separateScripts, showErrorTransportText, showLoadingText, transportaccesskey, 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, valueactionMapper, COMPONENT_STACK, parameters, stack, standardAttributesMap, throwExceptionOnELFailure| Constructor and Description |
|---|
Div(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() |
void |
setAutoStart(String autoStart) |
void |
setClosable(String closable) |
void |
setDelay(String delay) |
void |
setHighlightColor(String highlightColor) |
void |
setPreload(String preload) |
void |
setRefreshOnShow(String refreshOnShow) |
void |
setStartTimerListenTopics(String startTimerListenTopic) |
void |
setStopTimerListenTopics(String stopTimerListenTopic) |
void |
setUpdateFreq(String updateInterval) |
getTheme, setAfterNotifyTopics, setBeforeNotifyTopics, setCssClass, setCssStyle, setErrorNotifyTopics, setErrorText, setExecuteScripts, setFormFilter, setFormId, setHandler, setHighlightDuration, setHref, setId, setIndicator, setListenTopics, setLoadingText, setName, setNotifyTopics, setParseContent, setSeparateScripts, setShowErrorTransportText, setShowLoadingText, setTheme, setTransportsetOpenTemplate, startaddFormParameter, buildTemplateName, copyParams, enableAncestorFormCustomOnsubmit, end, ensureAttributeSafelyNotEscaped, escape, evaluateNameValue, evaluateParams, getId, getTemplate, getTemplateDir, getTooltipConfig, getValueClassType, mergeTemplate, populateComponentHtmlId, setAccesskey, setClass, setCssErrorClass, setCssErrorStyle, setDefaultTemplateDir, setDefaultUITheme, setDisabled, setDynamicAttributes, setErrorPosition, setJavascriptTooltip, setKey, setLabel, setLabelposition, setLabelSeparator, 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, setValueaddAllParameters, addParameter, altSyntax, completeExpressionIfAltSyntax, determineActionURL, determineNamespace, end, fieldError, findAncestor, findString, findString, findStringIfAltSyntax, findValue, findValue, findValue, getComponentStack, getParameters, getStack, getStandardAttributes, isValidTagAttribute, popComponentStack, setActionMapper, setThrowExceptionsOnELFailure, setUrlHelper, stripExpressionIfAltSyntax, toString, usesBodypublic static final String TEMPLATE
public static final String TEMPLATE_CLOSE
public static final String COMPONENT_NAME
protected String updateFreq
protected String autoStart
protected String delay
protected String startTimerListenTopics
protected String stopTimerListenTopics
protected String refreshOnShow
protected String closable
protected String preload
public Div(com.opensymphony.xwork2.util.ValueStack stack, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
public String getDefaultOpenTemplate()
getDefaultOpenTemplate in class ClosingUIBeanprotected String getDefaultTemplate()
getDefaultTemplate in class UIBeanpublic void evaluateExtraParams()
evaluateExtraParams in class AbstractRemoteBeanpublic void setAutoStart(String autoStart)
public void setDelay(String delay)
public void setUpdateFreq(String updateInterval)
public void setStartTimerListenTopics(String startTimerListenTopic)
public void setStopTimerListenTopics(String stopTimerListenTopic)
public void setRefreshOnShow(String refreshOnShow)
public void setClosable(String closable)
public void setPreload(String preload)
public void setHighlightColor(String highlightColor)
setHighlightColor in interface RemoteBeansetHighlightColor in class AbstractRemoteBeanCopyright © 2000-2014 Apache Software Foundation. All Rights Reserved.