com.opensymphony.webwork.components
Class Div

java.lang.Object
  extended by com.opensymphony.webwork.components.Component
      extended by com.opensymphony.webwork.components.UIBean
          extended by com.opensymphony.webwork.components.ClosingUIBean
              extended by com.opensymphony.webwork.components.RemoteCallUIBean
                  extended by com.opensymphony.webwork.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

 
 <ww:div ... />
 
 

Since:
2.2
Version:
$Revision: 2788 $
Author:
Ian Roughley, Rene Gielen

Field Summary
static String COMPONENT_NAME
           
protected  String delay
           
protected  String listenTopics
           
protected  String loadingText
           
static String TEMPLATE
           
static String TEMPLATE_CLOSE
           
protected  String updateFreq
           
 
Fields inherited from class com.opensymphony.webwork.components.RemoteCallUIBean
afterLoading, errorText, href, showErrorTransportText
 
Fields inherited from class com.opensymphony.webwork.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
 
Fields inherited from class com.opensymphony.webwork.components.Component
COMPONENT_STACK, id, parameters, stack
 
Constructor Summary
Div(OgnlValueStack stack, HttpServletRequest request, HttpServletResponse response)
           
 
Method Summary
 void evaluateExtraParams()
           
 String getDefaultOpenTemplate()
           
protected  String getDefaultTemplate()
          A contract that requires each concrete UI Tag to specify which template should be used as a default.
 void setDelay(String delay)
          How long to wait before fetching the content (in milliseconds)
 void setListenTopics(String listenTopics)
          Topic name to listen to (comma delimited), that will cause the DIV's content to be re-fetched
 void setLoadingText(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(String updateFreq)
          How often to re-fetch the content (in milliseconds)
 
Methods inherited from class com.opensymphony.webwork.components.RemoteCallUIBean
setAfterLoading, setErrorText, setHref, setShowErrorTransportText, setTheme
 
Methods inherited from class com.opensymphony.webwork.components.ClosingUIBean
setOpenTemplate, start
 
Methods inherited from class com.opensymphony.webwork.components.UIBean
addFormParameter, buildTemplateName, enableAncestorFormCustomOnsubmit, end, escape, evaluateNameValue, evaluateParams, getTemplate, getTemplateDir, getTheme, getTooltipConfig, getValueClassType, mergeTemplate, populateComponentHtmlId, setAccesskey, setCssClass, setCssStyle, setDisabled, setLabel, setLabelposition, 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 com.opensymphony.webwork.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
 

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

delay

protected String delay

loadingText

protected String loadingText

listenTopics

protected String listenTopics
Constructor Detail

Div

public Div(OgnlValueStack stack,
           HttpServletRequest request,
           HttpServletResponse response)
Method Detail

getDefaultOpenTemplate

public String getDefaultOpenTemplate()
Specified by:
getDefaultOpenTemplate in class ClosingUIBean

getDefaultTemplate

protected 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(String updateFreq)
How often to re-fetch the content (in milliseconds)


setDelay

public void setDelay(String delay)
How long to wait before fetching the content (in milliseconds)


setLoadingText

public void setLoadingText(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(String listenTopics)
Topic name to listen to (comma delimited), that will cause the DIV's content to be re-fetched


WebWork Project Page