Save This Page
Home » struts-2.1.8.1-src » org.apache.struts2.dojo » components » [javadoc | source]
org.apache.struts2.dojo.components
public class: Div [javadoc | source]
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

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>
Field Summary
public 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     
Fields inherited from org.apache.struts2.dojo.components.AbstractRemoteBean:
href,  errorText,  executeScripts,  loadingText,  listenTopics,  handler,  formId,  formFilter,  notifyTopics,  showErrorTransportText,  indicator,  showLoadingText,  beforeNotifyTopics,  afterNotifyTopics,  errorNotifyTopics,  highlightColor,  highlightDuration,  separateScripts,  transport,  parseContent
Fields inherited from org.apache.struts2.components.ClosingUIBean:
openTemplate
Fields inherited from org.apache.struts2.components.UIBean:
request,  response,  templateSuffix,  template,  templateDir,  theme,  key,  id,  cssClass,  cssStyle,  cssErrorClass,  cssErrorStyle,  disabled,  label,  labelPosition,  labelSeparator,  requiredposition,  name,  required,  tabindex,  value,  title,  onclick,  ondblclick,  onmousedown,  onmouseup,  onmouseover,  onmousemove,  onmouseout,  onfocus,  onblur,  onkeypress,  onkeydown,  onkeyup,  onselect,  onchange,  accesskey,  tooltip,  tooltipConfig,  javascriptTooltip,  tooltipDelay,  tooltipCssClass,  tooltipIconPath,  dynamicAttributes,  defaultTemplateDir,  defaultUITheme,  templateEngineManager
Fields inherited from org.apache.struts2.components.Component:
COMPONENT_STACK,  stack,  parameters,  actionMapper,  throwExceptionOnELFailure
Constructor:
 public Div(ValueStack stack,
    HttpServletRequest request,
    HttpServletResponse response) 
Method from org.apache.struts2.dojo.components.Div Summary:
evaluateExtraParams,   getDefaultOpenTemplate,   getDefaultTemplate,   setAutoStart,   setClosable,   setDelay,   setHighlightColor,   setPreload,   setRefreshOnShow,   setStartTimerListenTopics,   setStopTimerListenTopics,   setUpdateFreq
Methods from org.apache.struts2.dojo.components.AbstractRemoteBean:
evaluateExtraParams,   getTheme,   setAfterNotifyTopics,   setBeforeNotifyTopics,   setCssClass,   setCssStyle,   setErrorNotifyTopics,   setErrorText,   setExecuteScripts,   setFormFilter,   setFormId,   setHandler,   setHighlightColor,   setHighlightDuration,   setHref,   setId,   setIndicator,   setListenTopics,   setLoadingText,   setName,   setNotifyTopics,   setParseContent,   setSeparateScripts,   setShowErrorTransportText,   setShowLoadingText,   setTheme,   setTransport
Methods from org.apache.struts2.components.ClosingUIBean:
getDefaultOpenTemplate,   setOpenTemplate,   start
Methods from org.apache.struts2.components.UIBean:
addFormParameter,   buildTemplateName,   enableAncestorFormCustomOnsubmit,   end,   ensureAttributeSafelyNotEscaped,   escape,   evaluateExtraParams,   evaluateNameValue,   evaluateParams,   getDefaultTemplate,   getId,   getTemplate,   getTemplateDir,   getTheme,   getTooltipConfig,   getValueClassType,   mergeTemplate,   populateComponentHtmlId,   setAccesskey,   setCssClass,   setCssErrorClass,   setCssErrorStyle,   setCssStyle,   setDefaultTemplateDir,   setDefaultUITheme,   setDisabled,   setDynamicAttributes,   setId,   setJavascriptTooltip,   setKey,   setLabel,   setLabelSeparator,   setLabelposition,   setName,   setOnblur,   setOnchange,   setOnclick,   setOndblclick,   setOnfocus,   setOnkeydown,   setOnkeypress,   setOnkeyup,   setOnmousedown,   setOnmousemove,   setOnmouseout,   setOnmouseover,   setOnmouseup,   setOnselect,   setRequired,   setRequiredposition,   setTabindex,   setTemplate,   setTemplateDir,   setTemplateEngineManager,   setTheme,   setTitle,   setTooltip,   setTooltipConfig,   setTooltipCssClass,   setTooltipDelay,   setTooltipIconPath,   setValue
Methods from org.apache.struts2.components.Component:
addAllParameters,   addParameter,   altSyntax,   altSyntax,   completeExpressionIfAltSyntax,   copyParams,   determineActionURL,   determineNamespace,   end,   end,   fieldError,   findAncestor,   findString,   findString,   findStringIfAltSyntax,   findValue,   findValue,   findValue,   getComponentStack,   getParameters,   getStack,   popComponentStack,   setActionMapper,   setThrowExceptionsOnELFailure,   start,   stripExpressionIfAltSyntax,   stripExpressionIfAltSyntax,   toString,   usesBody
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.struts2.dojo.components.Div Detail:
 public  void evaluateExtraParams() 
 public String getDefaultOpenTemplate() 
 protected String getDefaultTemplate() 
 public  void setAutoStart(String autoStart) 
 public  void setClosable(String closable) 
 public  void setDelay(String delay) 
 public  void setHighlightColor(String highlightColor) 
 public  void setPreload(String preload) 
 public  void setRefreshOnShow(String refreshOnShow) 
 public  void setStartTimerListenTopics(String startTimerListenTopic) 
 public  void setStopTimerListenTopics(String stopTimerListenTopic) 
 public  void setUpdateFreq(String updateInterval)