Save This Page
Home » struts-1.3.9-src » org.apache.struts.taglib » html » [javadoc | source]
org.apache.struts.taglib.html
public class: FormTag [javadoc | source]
java.lang.Object
   javax.servlet.jsp.tagext.TagSupport
      org.apache.struts.taglib.html.FormTag

All Implemented Interfaces:
    IterationTag, Serializable

Direct Known Subclasses:
    SecureFormTag, ELFormTag

Custom tag that represents an input form, associated with a bean whose properties correspond to the various fields of the form.
Field Summary
protected  String action    The action URL to which this form should be submitted, if any. 
protected  ModuleConfig moduleConfig    The module configuration for our module. 
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 static  MessageResources messages    The message resources for this package. 
protected  String method    The request method used when submitting this form. 
protected  String onreset    The onReset event script. 
protected  String onsubmit    The onSubmit event script. 
protected  boolean scriptLanguage    Include language attribute in the focus script's <script> element. This property is ignored in XHTML mode.
    since: Struts - 1.2
 
protected  ActionServlet servlet    The ActionServlet instance we are associated with (so that we can initialize the servlet 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 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 associated ActionMapping 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 associated ActionMapping 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 associated ActionMapping otherwise. 
protected  String acceptCharset    The list of character encodings for input data that the server should accept. 
protected  boolean readonly    Controls whether child controls should be 'readonly'. 
Method from org.apache.struts.taglib.html.FormTag Summary:
doEndTag,   doStartTag,   getAcceptCharset,   getAction,   getBeanName,   getEnctype,   getFocus,   getFocusIndex,   getMethod,   getOnreset,   getOnsubmit,   getScriptLanguage,   getStyle,   getStyleClass,   getStyleId,   getTarget,   initFormBean,   isDisabled,   isReadonly,   lookup,   release,   renderAction,   renderAttribute,   renderFocusJavascript,   renderFormStartElement,   renderName,   renderOtherAttributes,   renderToken,   setAcceptCharset,   setAction,   setDisabled,   setEnctype,   setFocus,   setFocusIndex,   setMethod,   setOnreset,   setOnsubmit,   setReadonly,   setScriptLanguage,   setStyle,   setStyleClass,   setStyleId,   setTarget
Methods from javax.servlet.jsp.tagext.TagSupport:
doAfterBody,   doEndTag,   doStartTag,   findAncestorWithClass,   getId,   getParent,   getValue,   getValues,   release,   removeValue,   setId,   setPageContext,   setParent,   setValue
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.struts.taglib.html.FormTag Detail:
 public int doEndTag() throws JspException 
    Render the end of this form.
 public int doStartTag() throws JspException 
    Render the beginning of this form.
 public String getAcceptCharset() 
    Return the list of character encodings accepted.
 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.
 public String getMethod() 
    Return the request method used when submitting this form.
 public String getOnreset() 
    Return the onReset event script.
 public String getOnsubmit() 
    Return the onSubmit event script.
 public boolean getScriptLanguage() 
    Gets whether or not the focus script's <script> element will include the language attribute.
 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.
 protected  void initFormBean() throws JspException 
    Locate or create the bean associated with our form.
 public boolean isDisabled() 
    Returns the disabled event handler.
 public boolean isReadonly() 
    Returns the readonly event handler.
 protected  void lookup() throws JspException 
    Look up values for the name, scope, and type properties if necessary.
 public  void release() 
    Release any acquired resources.
 protected  void renderAction(StringBuffer results) 
    Renders the action attribute
 protected  void renderAttribute(StringBuffer results,
    String attribute,
    String value) 
    Renders attribute="value" if not null
 protected String renderFocusJavascript() 
    Generates javascript to set the initial focus to the form element given in the tag's "focus" attribute.
 protected String renderFormStartElement() 
    Generates the opening <form> element with appropriate attributes.
 protected  void renderName(StringBuffer results) 
    Renders the name of the form. If XHTML is set to true, the name will be rendered as an 'id' attribute, otherwise as a 'name' attribute.
 protected  void renderOtherAttributes(StringBuffer results) 
    'Hook' to enable this tag to be extended and additional attributes added.
 protected String renderToken() 
    Generates a hidden input field with token information, if any. The field is added within a div element for HTML 4.01 Strict compliance.
 public  void setAcceptCharset(String acceptCharset) 
    Set the list of character encodings accepted.
 public  void setAction(String action) 
    Set the action URL to which this form should be submitted.
 public  void setDisabled(boolean disabled) 
    Sets the disabled event handler.
 public  void setEnctype(String enctype) 
    Set the content encoding used when submitting this form.
 public  void setFocus(String focus) 
    Set the focus field name for this form.
 public  void setFocusIndex(String focusIndex) 
    Sets the focusIndex.
 public  void setMethod(String method) 
    Set the request method used when submitting this form.
 public  void setOnreset(String onReset) 
    Set the onReset event script.
 public  void setOnsubmit(String onSubmit) 
    Set the onSubmit event script.
 public  void setReadonly(boolean readonly) 
    Sets the readonly event handler.
 public  void setScriptLanguage(boolean scriptLanguage) 
    Sets whether or not the focus script's <script> element will include the language attribute.
 public  void setStyle(String style) 
    Set the style attribute for this tag.
 public  void setStyleClass(String styleClass) 
    Set the style class for this tag.
 public  void setStyleId(String styleId) 
    Set the style identifier for this tag.
 public  void setTarget(String target) 
    Set the window target.