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, type
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, standardAttributesMap, tabindex, template, templateDir, templateEngineManager, templateSuffix, theme, title, tooltip, tooltipConfig, tooltipCssClass, tooltipDelay, tooltipIconPath, value
actionMapper, COMPONENT_STACK, parameters, stack, 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, setMethod
setOpenTemplate, start
addFormParameter, buildTemplateName, copyParams, enableAncestorFormCustomOnsubmit, ensureAttributeSafelyNotEscaped, escape, evaluateNameValue, getId, getStandardAttributes, getTemplate, getTemplateDir, getTooltipConfig, getValueClassType, mergeTemplate, setAccesskey, 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, setTabindex, setTemplate, setTemplateDir, setTemplateEngineManager, setTitle, setTooltip, setTooltipConfig, setTooltipCssClass, setTooltipDelay, setTooltipIconPath
addAllParameters, addParameter, altSyntax, completeExpressionIfAltSyntax, determineActionURL, determineNamespace, end, fieldError, findAncestor, findString, findString, findStringIfAltSyntax, findValue, findValue, findValue, getComponentStack, getParameters, getStack, popComponentStack, setThrowExceptionsOnELFailure, setUrlHelper, stripExpressionIfAltSyntax, toString, usesBody
public 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 UIBean
public String getDefaultOpenTemplate()
getDefaultOpenTemplate
in class ClosingUIBean
public void evaluateParams()
evaluateParams
in class UIBean
public void evaluateExtraParams()
evaluateExtraParams
in class FormButton
protected boolean supportsImageType()
supportsImageType
in class FormButton
public boolean end(Writer writer, String body)
public void setListenTopics(String listenTopics)
setListenTopics
in interface RemoteBean
public void setHref(String href)
setHref
in interface RemoteBean
public void setErrorText(String errorText)
setErrorText
in interface RemoteBean
public void setExecuteScripts(String executeScripts)
setExecuteScripts
in interface RemoteBean
public void setLoadingText(String loadingText)
setLoadingText
in interface RemoteBean
public void setHandler(String handler)
setHandler
in interface RemoteBean
public void setFormFilter(String formFilter)
setFormFilter
in interface RemoteBean
public void setFormId(String formId)
setFormId
in interface RemoteBean
public void setSrc(String src)
public void setTargets(String targets)
public void setNotifyTopics(String notifyTopics)
setNotifyTopics
in interface RemoteBean
public void setShowErrorTransportText(String showErrorTransportText)
setShowErrorTransportText
in interface RemoteBean
public void setIndicator(String indicator)
setIndicator
in interface RemoteBean
public void setShowLoadingText(String showLoadingText)
setShowLoadingText
in interface RemoteBean
public void setCssClass(String cssClass)
setCssClass
in interface RemoteBean
setCssClass
in class UIBean
public void setCssStyle(String cssStyle)
setCssStyle
in interface RemoteBean
setCssStyle
in class UIBean
public void setName(String name)
setName
in interface RemoteBean
setName
in class UIBean
public void setType(String type)
setType
in class FormButton
public void setAfterNotifyTopics(String afterNotifyTopics)
setAfterNotifyTopics
in interface RemoteBean
public void setBeforeNotifyTopics(String beforeNotifyTopics)
setBeforeNotifyTopics
in interface RemoteBean
public void setErrorNotifyTopics(String errorNotifyTopics)
setErrorNotifyTopics
in interface RemoteBean
public void setHighlightColor(String highlightColor)
setHighlightColor
in interface RemoteBean
public void setHighlightDuration(String highlightDuration)
setHighlightDuration
in interface RemoteBean
public void setValidate(String validate)
public void setAjaxAfterValidation(String ajaxAfterValidation)
public void setAction(String action)
setAction
in class FormButton
public void setSeparateScripts(String separateScripts)
setSeparateScripts
in interface RemoteBean
public void setTransport(String transport)
setTransport
in interface RemoteBean
public void setParseContent(String parseContent)
setParseContent
in interface RemoteBean
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.