| java.lang.Object org.apache.struts2.components.Component org.apache.struts2.components.UIBean org.apache.struts2.components.ClosingUIBean org.apache.struts2.components.Form
Form | public class Form extends ClosingUIBean (Code) | |
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 ... />
|
configuration | protected Configuration configuration(Code) | | |
enableDynamicMethodInvocation | protected boolean enableDynamicMethodInvocation(Code) | | |
objectFactory | protected ObjectFactory objectFactory(Code) | | |
evaluateExtraParams | protected void evaluateExtraParams()(Code) | | |
evaluateNameValue | protected boolean evaluateNameValue()(Code) | | |
getDefaultOpenTemplate | public String getDefaultOpenTemplate()(Code) | | |
getDefaultTemplate | protected String getDefaultTemplate()(Code) | | |
getSequence | protected int getSequence()(Code) | | Get a incrementing sequence unique to this Form component.
It is used by Form component's child that might need a
sequence to make them unique.
int |
populateComponentHtmlId | protected void populateComponentHtmlId(Form form)(Code) | | The Form component determines its HTML element id as follows:-
- if an 'id' attribute is specified.
- if an 'action' attribute is specified, it will be used as the id.
|
setAcceptcharset | public void setAcceptcharset(String acceptcharset)(Code) | | |
setConfiguration | public void setConfiguration(Configuration configuration)(Code) | | |
setEnableDynamicMethodInvocation | public void setEnableDynamicMethodInvocation(String enable)(Code) | | |
setNamespace | public void setNamespace(String namespace)(Code) | | |
setObjectFactory | public void setObjectFactory(ObjectFactory objectFactory)(Code) | | |
setPortletMode | public void setPortletMode(String portletMode)(Code) | | |
setWindowState | public void setWindowState(String windowState)(Code) | | |
Methods inherited from org.apache.struts2.components.Component | public void addAllParameters(Map params)(Code)(Java Doc) public void addParameter(String key, Object value)(Code)(Java Doc) public boolean altSyntax()(Code)(Java Doc) public void copyParams(Map params)(Code)(Java Doc) protected String determineActionURL(String action, String namespace, String method, HttpServletRequest req, HttpServletResponse res, Map parameters, String scheme, boolean includeContext, boolean encodeResult)(Code)(Java Doc) protected String determineActionURL(String action, String namespace, String method, HttpServletRequest req, HttpServletResponse res, Map parameters, String scheme, boolean includeContext, boolean encodeResult, boolean forceAddSchemeHostAndPort, boolean escapeAmp)(Code)(Java Doc) protected String determineNamespace(String namespace, ValueStack stack, HttpServletRequest req)(Code)(Java Doc) public boolean end(Writer writer, String body)(Code)(Java Doc) protected boolean end(Writer writer, String body, boolean popComponentStack)(Code)(Java Doc) protected StrutsException fieldError(String field, String errorMsg, Exception e)(Code)(Java Doc) protected Component findAncestor(Class clazz)(Code)(Java Doc) protected String findString(String expr)(Code)(Java Doc) protected String findString(String expr, String field, String errorMsg)(Code)(Java Doc) protected Object findValue(String expr)(Code)(Java Doc) protected Object findValue(String expr, String field, String errorMsg)(Code)(Java Doc) protected Object findValue(String expr, Class toType)(Code)(Java Doc) public Stack getComponentStack()(Code)(Java Doc) public String getId()(Code)(Java Doc) public Map getParameters()(Code)(Java Doc) public ValueStack getStack()(Code)(Java Doc) protected void popComponentStack()(Code)(Java Doc) public void setActionMapper(ActionMapper mapper)(Code)(Java Doc) public void setId(String id)(Code)(Java Doc) public boolean start(Writer writer)(Code)(Java Doc) protected String toString(Throwable t)(Code)(Java Doc) public boolean usesBody()(Code)(Java Doc)
|
|
|