org.apache.struts2.components
Class Div
java.lang.Object
org.apache.struts2.components.Component
org.apache.struts2.components.UIBean
org.apache.struts2.components.ClosingUIBean
org.apache.struts2.components.RemoteCallUIBean
org.apache.struts2.components.Div
- Direct Known Subclasses:
- Panel
public class Div
- extends RemoteCallUIBean
The div tag is primarily an AJAX tag, providing a remote call from the current page to update a section
of content without having to refresh the entire page.
It creates a HTML <DIV /> that obtains it's content via a remote XMLHttpRequest call
via the dojo framework.
If a "listenTopics" is supplied, it will listen to that topic and refresh it's content when any message
is received.
Important: Be sure to setup the page containing this tag to be Configured for AJAX
Examples
<s:div ... />
Fields inherited from class org.apache.struts2.components.UIBean |
accesskey, cssClass, cssStyle, disabled, label, labelPosition, name, onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onselect, request, required, requiredposition, response, tabindex, template, templateDir, templateSuffix, theme, title, tooltip, tooltipConfig, value |
Constructor Summary |
Div(com.opensymphony.xwork2.util.OgnlValueStack stack,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
Method Summary |
void |
evaluateExtraParams()
|
java.lang.String |
getDefaultOpenTemplate()
|
protected java.lang.String |
getDefaultTemplate()
A contract that requires each concrete UI Tag to specify which template should be used as a default. |
void |
setDelay(java.lang.String delay)
How long to wait before fetching the content (in milliseconds) |
void |
setListenTopics(java.lang.String listenTopics)
Topic name to listen to (comma delimited), that will cause the DIV's content to be re-fetched |
void |
setLoadingText(java.lang.String loadingText)
The text to display to the user while the new content is being fetched (especially good if the content will take awhile) |
void |
setUpdateFreq(java.lang.String updateFreq)
How often to re-fetch the content (in milliseconds) |
Methods inherited from class org.apache.struts2.components.UIBean |
addFormParameter, buildTemplateName, enableAncestorFormCustomOnsubmit, end, escape, evaluateNameValue, evaluateParams, getTemplate, getTemplateDir, getTheme, getTooltipConfig, getValueClassType, mergeTemplate, populateComponentHtmlId, setAccesskey, setCssClass, setCssStyle, setDisabled, setLabel, setLabelposition, setName, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setRequired, setRequiredposition, setTabindex, setTemplate, setTemplateDir, setTitle, setTooltip, setTooltipConfig, setValue |
Methods inherited from class org.apache.struts2.components.Component |
addAllParameters, addParameter, altSyntax, copyParams, determineActionURL, determineNamespace, end, fieldError, findAncestor, findString, findString, findValue, findValue, findValue, getComponentStack, getId, getParameters, getStack, popComponentStack, setId, 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
COMPONENT_NAME
public static final java.lang.String COMPONENT_NAME
updateFreq
protected java.lang.String updateFreq
delay
protected java.lang.String delay
loadingText
protected java.lang.String loadingText
listenTopics
protected java.lang.String listenTopics
Div
public Div(com.opensymphony.xwork2.util.OgnlValueStack stack,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
getDefaultOpenTemplate
public java.lang.String getDefaultOpenTemplate()
- Specified by:
getDefaultOpenTemplate
in class ClosingUIBean
getDefaultTemplate
protected java.lang.String getDefaultTemplate()
- Description copied from class:
UIBean
- A contract that requires each concrete UI Tag to specify which template should be used as a default. For
example, the CheckboxTab might return "checkbox.vm" while the RadioTag might return "radio.vm". This value
not begin with a '/' unless you intend to make the path absolute rather than relative to the
current theme.
- Specified by:
getDefaultTemplate
in class UIBean
- Returns:
- The name of the template to be used as the default.
evaluateExtraParams
public void evaluateExtraParams()
- Overrides:
evaluateExtraParams
in class RemoteCallUIBean
setUpdateFreq
public void setUpdateFreq(java.lang.String updateFreq)
- How often to re-fetch the content (in milliseconds)
setDelay
public void setDelay(java.lang.String delay)
- How long to wait before fetching the content (in milliseconds)
setLoadingText
public void setLoadingText(java.lang.String loadingText)
- The text to display to the user while the new content is being fetched (especially good if the content will take awhile)
setListenTopics
public void setListenTopics(java.lang.String listenTopics)
- Topic name to listen to (comma delimited), that will cause the DIV's content to be re-fetched
Copyright © 2000-2006 Apache Software Foundation. All Rights Reserved.