org.apache.struts2.components
类 Form
java.lang.Object
org.apache.struts2.components.Component
org.apache.struts2.components.UIBean
org.apache.struts2.components.ClosingUIBean
org.apache.struts2.components.Form
public class Form
- extends ClosingUIBean
Renders HTML an input form.
The remote form allows the form to be submitted without the page being refreshed. The results from the form
can be inserted into any HTML element on the page.
NOTE:
The order / logic in determining the posting url of the generated HTML form is as follows:-
-
If the action attribute is not specified, then the current request will be used to
determine the posting url
-
If the action is given, Struts will try to obtain an ActionConfig. This will be
successfull if the action attribute is a valid action alias defined struts.xml.
-
If the action is given and is not an action alias defined in struts.xml, Struts
will used the action attribute as if it is the posting url, separting the namespace
from it and using UrlHelper to generate the final url.
Examples
<s:form ... />
构造方法摘要 |
Form(com.opensymphony.xwork2.util.ValueStack stack,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
从类 org.apache.struts2.components.UIBean 继承的方法 |
addFormParameter, copyParams, end, evaluateParams, getId, getTemplate, getTemplateDir, getTheme, setAccesskey, setCssClass, setCssErrorClass, setCssErrorStyle, setCssStyle, setDefaultTemplateDir, setDefaultUITheme, setDisabled, setDynamicAttributes, setErrorPosition, setId, setJavascriptTooltip, setKey, setLabel, setLabelposition, setLabelSeparator, setName, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setRequiredLabel, setRequiredPosition, setTabindex, setTemplate, setTemplateDir, setTemplateEngineManager, setTheme, setTitle, setTooltip, setTooltipConfig, setTooltipCssClass, setTooltipDelay, setTooltipIconPath, setUIThemeExpansionToken, setValue |
OPEN_TEMPLATE
public static final String OPEN_TEMPLATE
- 另请参见:
- 常量字段值
TEMPLATE
public static final String TEMPLATE
- 另请参见:
- 常量字段值
Form
public Form(com.opensymphony.xwork2.util.ValueStack stack,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
getDefaultOpenTemplate
public String getDefaultOpenTemplate()
- 指定者:
- 类
ClosingUIBean
中的 getDefaultOpenTemplate
setConfiguration
public void setConfiguration(com.opensymphony.xwork2.config.Configuration configuration)
setObjectFactory
public void setObjectFactory(com.opensymphony.xwork2.ObjectFactory objectFactory)
setUrlRenderer
public void setUrlRenderer(UrlRenderer urlRenderer)
setActionValidatorManager
public void setActionValidatorManager(com.opensymphony.xwork2.validator.ActionValidatorManager mgr)
getValidators
public List getValidators(String name)
setOnsubmit
public void setOnsubmit(String onsubmit)
setOnreset
public void setOnreset(String onreset)
setAction
public void setAction(String action)
setTarget
public void setTarget(String target)
setEnctype
public void setEnctype(String enctype)
setMethod
public void setMethod(String method)
setNamespace
public void setNamespace(String namespace)
setValidate
public void setValidate(String validate)
setPortletMode
public void setPortletMode(String portletMode)
setWindowState
public void setWindowState(String windowState)
setAcceptcharset
public void setAcceptcharset(String acceptcharset)
setFocusElement
public void setFocusElement(String focusElement)
setIncludeContext
public void setIncludeContext(boolean includeContext)