Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
TagSupport
org.apache.struts.taglib.html.FormTag
public class FormTag
extends TagSupport
Field Summary | |
protected String |
|
protected String |
|
protected String |
|
protected String |
|
protected String |
|
protected String |
|
protected String |
|
protected static String |
|
protected ActionMapping |
|
protected static MessageResources |
|
protected String |
|
protected ModuleConfig |
|
protected String |
|
protected String |
|
protected String |
|
protected String |
|
protected ActionServlet |
|
protected String |
|
protected String |
|
protected String |
|
protected String |
|
protected String |
|
Method Summary | |
int |
|
int |
|
String |
|
String |
|
String |
|
String |
|
String |
|
String |
|
String |
|
String |
|
String |
|
String |
|
String |
|
String |
|
String |
|
String |
|
String |
|
protected void |
|
private boolean |
|
protected void |
|
void |
|
protected String |
|
protected String |
|
protected String |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
protected String action
The action URL to which this form should be submitted, if any.
protected String beanName
The name of the form bean to (create and) use. This is either the same as the 'name' attribute, if that was specified, or is obtained from the associatedActionMapping
otherwise.
protected String beanScope
The scope of the form bean to (create and) use. This is either the same as the 'scope' attribute, if that was specified, or is obtained from the associatedActionMapping
otherwise.
protected String beanType
The type of the form bean to (create and) use. This is either the same as the 'type' attribute, if that was specified, or is obtained from the associatedActionMapping
otherwise.
protected String enctype
The content encoding to be used on a POST submit.
protected String focus
The name of the field to receive focus, if any.
protected String focusIndex
The index in the focus field array to receive focus. This only applies if the field given in the focus attribute is actually an array of fields. This allows a specific field in a radio button array to receive focus while still allowing indexed field names like "myRadioButtonField[1]" to be passed in the focus attribute.
- Since:
- Struts 1.1
protected static String lineEnd
The line ending string.
protected ActionMapping mapping
The ActionMapping defining where we will be submitting this form
protected String method
The request method used when submitting this form.
protected String name
The attribute key under which our associated bean is stored.
protected String onreset
The onReset event script.
protected String onsubmit
The onSubmit event script.
protected String scope
The scope (request or session) under which our associated bean is stored.
protected ActionServlet servlet
The ActionServlet instance we are associated with (so that we can initialize theservlet
property on any form bean that we create).
protected String style
The style attribute associated with this tag.
protected String styleClass
The style class associated with this tag.
protected String styleId
The identifier associated with this tag.
protected String target
The window target.
protected String type
The Java class name of the bean to be created, if necessary.
public int doEndTag() throws JspException
Render the end of this form.
public int doStartTag() throws JspException
Render the beginning of this form.
public String getAction()
Return the action URL to which this form should be submitted.
public String getBeanName()
Return the name of the form bean corresponding to this tag. There is no corresponding setter method; this method exists so that the nested tag classes can obtain the actual bean name derived from other attributes of the tag.
public String getEnctype()
Return the content encoding used when submitting this form.
public String getFocus()
Return the focus field name for this form.
public String getFocusIndex()
Returns the focusIndex.
- Returns:
- String
public String getMethod()
Return the request method used when submitting this form.
public String getName()
Return the attribute key name of our bean.
public String getOnreset()
Return the onReset event script.
public String getOnsubmit()
Return the onSubmit event script.
public String getScope()
Return the attribute scope of our bean.
public String getStyle()
Return the style attribute for this tag.
public String getStyleClass()
Return the style class for this tag.
public String getStyleId()
Return the style identifier for this tag.
public String getTarget()
Return the window target.
public String getType()
Return the Java class of our bean.
protected void initFormBean() throws JspException
Locate or create the bean associated with our form.
- Since:
- Struts 1.1
private boolean isXhtml()
Returns true if this tag should render as xhtml.
protected void lookup() throws JspException
Look up values for thename
,scope
, andtype
properties if necessary.
public void release()
Release any acquired resources.
protected String renderFocusJavascript()
Generates javascript to set the initial focus to the form element given in the tag's "focus" attribute.
- Since:
- Struts 1.1
protected String renderFormStartElement()
Generates the opening<form>
element with appropriate attributes.
- Since:
- Struts 1.1
protected String renderToken()
Generates a hidden input field with token information, if any.
- Returns:
- A hidden input field containing the token.
- Since:
- Struts 1.1
public void setAction(String action)
Set the action URL to which this form should be submitted.
- Parameters:
action
- The new action URL
public void setEnctype(String enctype)
Set the content encoding used when submitting this form.
- Parameters:
enctype
- The new content encoding
public void setFocus(String focus)
Set the focus field name for this form.
- Parameters:
focus
- The new focus field name
public void setFocusIndex(String focusIndex)
Sets the focusIndex.
- Parameters:
focusIndex
- The focusIndex to set
public void setMethod(String method)
Set the request method used when submitting this form.
- Parameters:
method
- The new request method
public void setName(String name)
Set the attribute key name of our bean.
- Parameters:
name
- The new attribute key name
public void setOnreset(String onReset)
Set the onReset event script.
- Parameters:
onReset
- The new event script
public void setOnsubmit(String onSubmit)
Set the onSubmit event script.
- Parameters:
onSubmit
- The new event script
public void setScope(String scope)
Set the attribute scope of our bean.
- Parameters:
scope
- The new attribute scope
public void setStyle(String style)
Set the style attribute for this tag.
- Parameters:
style
- The new style attribute
public void setStyleClass(String styleClass)
Set the style class for this tag.
- Parameters:
styleClass
- The new style class
public void setStyleId(String styleId)
Set the style identifier for this tag.
- Parameters:
styleId
- The new style identifier
public void setTarget(String target)
Set the window target.
- Parameters:
target
- The new window target
public void setType(String type)
Set the Java class of our bean.
- Parameters:
type
- The new Java class