public class Submit extends FormButton implements RemoteBean
Examples
<sx:submit value="%{'Submit'}" /> <sx:submit type="image" value="%{'Submit'}" label="Submit the form" src="submit.gif"/> <sx:submit type="button" value="%{'Submit'}" label="Submit the form"/> <div id="div1">Div 1</div> <s:url id="ajaxTest" value="/AjaxTest.action"/> <sx:submit id="link1" href="%{ajaxTest}" target="div1" /> <s:form id="form" action="AjaxTest"> <input type="textbox" name="data"> <sx:submit /> </s:form> <s:form id="form" action="AjaxTest"> <input type="textbox" name="data"> </s:form> <sx:submit formId="form" /> <script type="text/javascript"> dojo.event.topic.subscribe("/before", function(event, widget){ alert('inside a topic event. before request'); //event: set event.cancel = true, to cancel request //widget: widget that published the topic }); </script> <sx:submit beforeNotifyTopics="/before" /> <script type="text/javascript"> dojo.event.topic.subscribe("/after", function(data, request, widget){ alert('inside a topic event. after request'); //data : text returned from request(the html) //request: XMLHttpRequest object //widget: widget that published the topic }); </script> <sx:submit afterNotifyTopics="/after" highlightColor="red" href="%{#ajaxTest}" /> <script type="text/javascript"> dojo.event.topic.subscribe("/error", function(error, request, widget){ alert('inside a topic event. on error'); //error : error object (error.message has the error message) //request: XMLHttpRequest object //widget: widget that published the topic }); </script> <img id="ind1" src="${pageContext.request.contextPath}/images/indicator.gif" style="display:none"/> <sx:submit errorNotifyTopics="/error" indicator="ind1" href="%{#ajaxTest}" />| Modifier and Type | Field and Description |
|---|---|
protected String |
afterNotifyTopics |
protected String |
ajaxAfterValidation |
protected String |
beforeNotifyTopics |
protected String |
errorNotifyTopics |
protected String |
errorText |
protected String |
executeScripts |
protected String |
formFilter |
protected String |
formId |
protected String |
handler |
protected String |
highlightColor |
protected String |
highlightDuration |
protected String |
href |
protected String |
indicator |
protected String |
listenTopics |
protected String |
loadingText |
protected String |
notifyTopics |
static String |
OPEN_TEMPLATE |
protected String |
parseContent |
protected String |
separateScripts |
protected String |
showErrorTransportText |
protected String |
showLoadingText |
protected String |
src |
protected String |
targets |
static String |
TEMPLATE |
protected String |
transport |
protected String |
validate |
action, align, method, typeaccesskey, 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 |
|---|
Submit(com.opensymphony.xwork2.util.ValueStack stack,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
end(Writer writer,
String body)
Overrides to be able to render body in a template rather than always before the template
|
void |
evaluateExtraParams() |
void |
evaluateParams() |
String |
getDefaultOpenTemplate() |
protected String |
getDefaultTemplate() |
String |
getTheme() |
void |
setAction(String action) |
void |
setAfterNotifyTopics(String afterNotifyTopics) |
void |
setAjaxAfterValidation(String ajaxAfterValidation) |
void |
setBeforeNotifyTopics(String beforeNotifyTopics) |
void |
setCssClass(String cssClass) |
void |
setCssStyle(String cssStyle) |
void |
setErrorNotifyTopics(String errorNotifyTopics) |
void |
setErrorText(String errorText) |
void |
setExecuteScripts(String executeScripts) |
void |
setFormFilter(String formFilter) |
void |
setFormId(String formId) |
void |
setHandler(String handler) |
void |
setHighlightColor(String highlightColor) |
void |
setHighlightDuration(String highlightDuration) |
void |
setHref(String href) |
void |
setId(String id) |
void |
setIndicator(String indicator) |
void |
setLabel(String label) |
void |
setListenTopics(String listenTopics) |
void |
setLoadingText(String loadingText) |
void |
setName(String name) |
void |
setNotifyTopics(String notifyTopics) |
void |
setParseContent(String parseContent) |
void |
setSeparateScripts(String separateScripts) |
void |
setShowErrorTransportText(String showErrorTransportText) |
void |
setShowLoadingText(String showLoadingText) |
void |
setSrc(String src) |
void |
setTargets(String targets) |
void |
setTheme(String theme) |
void |
setTransport(String transport) |
void |
setType(String type) |
void |
setValidate(String validate) |
void |
setValue(String value) |
protected boolean |
supportsImageType()
Indicate whether the concrete button supports the type "image".
|
populateComponentHtmlId, setActionMapper, setAlign, setMethodsetOpenTemplate, startaddFormParameter, buildTemplateName, copyParams, enableAncestorFormCustomOnsubmit, ensureAttributeSafelyNotEscaped, escape, evaluateNameValue, getId, getTemplate, getTemplateDir, getTooltipConfig, getValueClassType, mergeTemplate, setAccesskey, setClass, setCssErrorClass, setCssErrorStyle, setDefaultTemplateDir, setDefaultUITheme, setDisabled, setDynamicAttributes, setErrorPosition, setJavascriptTooltip, setKey, 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, setUIThemeExpansionTokenaddAllParameters, addParameter, altSyntax, completeExpressionIfAltSyntax, determineActionURL, determineNamespace, end, fieldError, findAncestor, findString, findString, findStringIfAltSyntax, findValue, findValue, findValue, getComponentStack, getParameters, getStack, getStandardAttributes, isValidTagAttribute, popComponentStack, setThrowExceptionsOnELFailure, setUrlHelper, stripExpressionIfAltSyntax, toString, usesBodypublic static final String OPEN_TEMPLATE
public static final String TEMPLATE
protected String href
protected String errorText
protected String executeScripts
protected String loadingText
protected String listenTopics
protected String handler
protected String formId
protected String formFilter
protected String src
protected String notifyTopics
protected String showErrorTransportText
protected String indicator
protected String showLoadingText
protected String targets
protected String beforeNotifyTopics
protected String afterNotifyTopics
protected String errorNotifyTopics
protected String highlightColor
protected String highlightDuration
protected String validate
protected String ajaxAfterValidation
protected String separateScripts
protected String transport
protected String parseContent
public Submit(com.opensymphony.xwork2.util.ValueStack stack,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
protected String getDefaultTemplate()
getDefaultTemplate in class UIBeanpublic String getDefaultOpenTemplate()
getDefaultOpenTemplate in class ClosingUIBeanpublic void evaluateParams()
evaluateParams in class UIBeanpublic void evaluateExtraParams()
evaluateExtraParams in class FormButtonprotected boolean supportsImageType()
supportsImageType in class FormButtonpublic boolean end(Writer writer, String body)
public void setListenTopics(String listenTopics)
setListenTopics in interface RemoteBeanpublic void setHref(String href)
setHref in interface RemoteBeanpublic void setErrorText(String errorText)
setErrorText in interface RemoteBeanpublic void setExecuteScripts(String executeScripts)
setExecuteScripts in interface RemoteBeanpublic void setLoadingText(String loadingText)
setLoadingText in interface RemoteBeanpublic void setHandler(String handler)
setHandler in interface RemoteBeanpublic void setFormFilter(String formFilter)
setFormFilter in interface RemoteBeanpublic void setFormId(String formId)
setFormId in interface RemoteBeanpublic void setSrc(String src)
public void setTargets(String targets)
public void setNotifyTopics(String notifyTopics)
setNotifyTopics in interface RemoteBeanpublic void setShowErrorTransportText(String showErrorTransportText)
setShowErrorTransportText in interface RemoteBeanpublic void setIndicator(String indicator)
setIndicator in interface RemoteBeanpublic void setShowLoadingText(String showLoadingText)
setShowLoadingText in interface RemoteBeanpublic void setCssClass(String cssClass)
setCssClass in interface RemoteBeansetCssClass in class UIBeanpublic void setCssStyle(String cssStyle)
setCssStyle in interface RemoteBeansetCssStyle in class UIBeanpublic void setName(String name)
setName in interface RemoteBeansetName in class UIBeanpublic void setType(String type)
setType in class FormButtonpublic void setAfterNotifyTopics(String afterNotifyTopics)
setAfterNotifyTopics in interface RemoteBeanpublic void setBeforeNotifyTopics(String beforeNotifyTopics)
setBeforeNotifyTopics in interface RemoteBeanpublic void setErrorNotifyTopics(String errorNotifyTopics)
setErrorNotifyTopics in interface RemoteBeanpublic void setHighlightColor(String highlightColor)
setHighlightColor in interface RemoteBeanpublic void setHighlightDuration(String highlightDuration)
setHighlightDuration in interface RemoteBeanpublic void setValidate(String validate)
public void setAjaxAfterValidation(String ajaxAfterValidation)
public void setAction(String action)
setAction in class FormButtonpublic void setSeparateScripts(String separateScripts)
setSeparateScripts in interface RemoteBeanpublic void setTransport(String transport)
setTransport in interface RemoteBeanpublic void setParseContent(String parseContent)
setParseContent in interface RemoteBeanCopyright © 2000-2014 Apache Software Foundation. All Rights Reserved.