Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts2.dojo.components
Class Div

    java.lang.Object
      org.apache.struts2.components.Component
          org.apache.struts2.components.UIBean
              org.apache.struts2.components.ClosingUIBean
                  org.apache.struts2.dojo.components.AbstractRemoteBean
                      org.apache.struts2.dojo.components.Div

All Implemented Interfaces:
  RemoteBean

    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:

- refreshOnShow: div content is realoded when tab is selected
- closable: Tab will have close button
- preload: load div content after page is loaded

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>

Field Summary
`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`

Fields inherited from class org.apache.struts2.dojo.components.AbstractRemoteBean
`afterNotifyTopics, beforeNotifyTopics, errorNotifyTopics, errorText, executeScripts, formFilter, formId, handler, highlightColor, highlightDuration, href, indicator, listenTopics, loadingText, notifyTopics, parseContent, separateScripts, showErrorTransportText, showLoadingText, transport`

Fields inherited from class org.apache.struts2.components.UIBean
`accesskey, 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`

Fields inherited from class org.apache.struts2.components.Component
`actionMapper, COMPONENT_STACK, devMode, parameters, stack, standardAttributesMap, throwExceptionOnELFailure`

Constructor Summary
`Div(com.opensymphony.xwork2.util.ValueStack stack, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)`

Method Summary
`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)`

Methods inherited from class org.apache.struts2.dojo.components.AbstractRemoteBean
`getTheme, setAfterNotifyTopics, setBeforeNotifyTopics, setCssClass, setCssStyle, setErrorNotifyTopics, setErrorText, setExecuteScripts, setFormFilter, setFormId, setHandler, setHighlightDuration, setHref, setId, setIndicator, setListenTopics, setLoadingText, setName, setNotifyTopics, setParseContent, setSeparateScripts, setShowErrorTransportText, setShowLoadingText, setTheme, setTransport`

Methods inherited from class org.apache.struts2.components.ClosingUIBean
`setOpenTemplate, start`

Methods inherited from class org.apache.struts2.components.UIBean
`addFormParameter, 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, setValue`

Methods inherited from class org.apache.struts2.components.Component
`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, stripExpressionIfAltSyntax, toString, usesBody`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### TEMPLATE

    public static final String TEMPLATE

See Also:
  Constant Field Values

### TEMPLATE_CLOSE

    public static final String TEMPLATE_CLOSE

See Also:
  Constant Field Values

### COMPONENT_NAME

    public static final String COMPONENT_NAME

### updateFreq

    protected String updateFreq

### autoStart

    protected String autoStart

### delay

    protected String delay

### startTimerListenTopics

    protected String startTimerListenTopics

### stopTimerListenTopics

    protected String stopTimerListenTopics

### refreshOnShow

    protected String refreshOnShow

### closable

    protected String closable

### preload

    protected String preload

Constructor Detail

### Div

    public Div(com.opensymphony.xwork2.util.ValueStack stack,
               javax.servlet.http.HttpServletRequest request,
               javax.servlet.http.HttpServletResponse response)

Method Detail

### getDefaultOpenTemplate

    public String getDefaultOpenTemplate()

  Specified by:
    `getDefaultOpenTemplate` in class `ClosingUIBean`

### getDefaultTemplate

    protected String getDefaultTemplate()

  Specified by:
    `getDefaultTemplate` in class `UIBean`

### evaluateExtraParams

    public void evaluateExtraParams()

  Overrides:
    `evaluateExtraParams` in class `AbstractRemoteBean`

### setAutoStart

    public void setAutoStart(String autoStart)

### setDelay

    public void setDelay(String delay)

### setUpdateFreq

    public void setUpdateFreq(String updateInterval)

### setStartTimerListenTopics

    public void setStartTimerListenTopics(String startTimerListenTopic)

### setStopTimerListenTopics

    public void setStopTimerListenTopics(String stopTimerListenTopic)

### setRefreshOnShow

    public void setRefreshOnShow(String refreshOnShow)

### setClosable

    public void setClosable(String closable)

### setPreload

    public void setPreload(String preload)

### setHighlightColor

    public void setHighlightColor(String highlightColor)

  Specified by:
    `setHighlightColor` in interface `RemoteBean`
  Overrides:
    `setHighlightColor` in class `AbstractRemoteBean`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000–2018 Apache Software Foundation. All rights reserved.