org.apache.struts.taglib
Class FormTag

org.apache.struts.taglib.FormTag

public final class FormTag

Custom tag that represents an input form, associated with a bean whose properties correspond to the various fields of the form.

Version:
$Revision: 1.11 $ $Date: 2001/05/20 01:19:01 $
Author:
Craig R. McClanahan

Field Summary
private  java.lang.String action
          The action URL to which this form should be submitted, if any.
private  java.lang.String enctype
          The content encoding to be used on a POST submit.
private  java.lang.String focus
          The name of the field to receive focus, if any.
protected static MessageResources messages
          The message resources for this package.
private  java.lang.String method
          The request method used when submitting this form.
private  java.lang.String name
          The attribute key under which our associated bean is stored.
private  java.lang.String onReset
          The onReset event script.
private  java.lang.String onSubmit
          The onSubmit event script.
private  java.lang.String scope
          The scope (request or session) under which our associated bean is stored.
private  java.lang.String style
          The style attribute associated with this tag.
private  java.lang.String styleClass
          The style class associated with this tag.
private  java.lang.String styleId
          The identifier associated with this tag.
protected  java.lang.String target
          The window target.
private  java.lang.String type
          The Java class name of the bean to be created, if necessary.
 
Constructor Summary
FormTag()
           
 
Method Summary
 int doEndTag()
          Render the end of this form.
 int doStartTag()
          Render the beginning of this form.
 java.lang.String getAction()
          Return the action URL to which this form should be submitted.
 java.lang.String getEnctype()
           
 java.lang.String getFocus()
          Return the focus field name for this form.
 java.lang.String getMethod()
          Return the request method used when submitting this form.
 java.lang.String getName()
          Return the attribute key name of our bean.
 java.lang.String getOnReset()
          Return the onReset event script.
 java.lang.String getOnSubmit()
          Return the onSubmit event script.
 java.lang.String getScope()
          Return the attribute scope of our bean.
 java.lang.String getStyle()
          Return the style attribute for this tag.
 java.lang.String getStyleClass()
          Return the style class for this tag.
 java.lang.String getStyleId()
          Return the style id for this tag.
 java.lang.String getTarget()
          Return the window target.
 java.lang.String getType()
          Return the Java class of our bean.
 void release()
          Release any acquired resources.
 void setAction(java.lang.String action)
          Set the action URL to which this form should be submitted.
 void setEnctype(java.lang.String enctype)
           
 void setFocus(java.lang.String focus)
          Set the focus field name for this form.
 void setMethod(java.lang.String method)
          Set the request method used when submitting this form.
 void setName(java.lang.String name)
          Set the attribute key name of our bean.
 void setOnReset(java.lang.String onReset)
          Set the onReset event script.
 void setOnSubmit(java.lang.String onSubmit)
          Set the onSubmit event script.
 void setScope(java.lang.String scope)
          Set the attribute scope of our bean.
 void setStyle(java.lang.String style)
          Set the style attribute for this tag.
 void setStyleClass(java.lang.String styleClass)
          Set the style class for this tag.
 void setStyleId(java.lang.String styleId)
          Set the style id for this tag.
 void setTarget(java.lang.String target)
          Set the window target.
 void setType(java.lang.String type)
          Set the Java class of our bean.
 

Field Detail

action

private java.lang.String action
The action URL to which this form should be submitted, if any.

enctype

private java.lang.String enctype
The content encoding to be used on a POST submit.

focus

private java.lang.String focus
The name of the field to receive focus, if any.

messages

protected static MessageResources messages
The message resources for this package.

method

private java.lang.String method
The request method used when submitting this form.

name

private java.lang.String name
The attribute key under which our associated bean is stored.

onReset

private java.lang.String onReset
The onReset event script.

onSubmit

private java.lang.String onSubmit
The onSubmit event script.

scope

private java.lang.String scope
The scope (request or session) under which our associated bean is stored.

style

private java.lang.String style
The style attribute associated with this tag.

styleClass

private java.lang.String styleClass
The style class associated with this tag.

styleId

private java.lang.String styleId
The identifier associated with this tag.

target

protected java.lang.String target
The window target.

type

private java.lang.String type
The Java class name of the bean to be created, if necessary.
Constructor Detail

FormTag

public FormTag()
Method Detail

getEnctype

public java.lang.String getEnctype()

setEnctype

public void setEnctype(java.lang.String enctype)

getAction

public java.lang.String getAction()
Return the action URL to which this form should be submitted.

setAction

public void setAction(java.lang.String action)
Set the action URL to which this form should be submitted.
Parameters:
action - The new action URL

getFocus

public java.lang.String getFocus()
Return the focus field name for this form.

setFocus

public void setFocus(java.lang.String focus)
Set the focus field name for this form.
Parameters:
focus - The new focus field name

getMethod

public java.lang.String getMethod()
Return the request method used when submitting this form.

setMethod

public void setMethod(java.lang.String method)
Set the request method used when submitting this form.
Parameters:
method - The new request method

getName

public java.lang.String getName()
Return the attribute key name of our bean.

setName

public void setName(java.lang.String name)
Set the attribute key name of our bean.
Parameters:
name - The new attribute key name

getOnReset

public java.lang.String getOnReset()
Return the onReset event script.

setOnReset

public void setOnReset(java.lang.String onReset)
Set the onReset event script.
Parameters:
onReset - The new event script

getOnSubmit

public java.lang.String getOnSubmit()
Return the onSubmit event script.

setOnSubmit

public void setOnSubmit(java.lang.String onSubmit)
Set the onSubmit event script.
Parameters:
onSubmit - The new event script

getScope

public java.lang.String getScope()
Return the attribute scope of our bean.

setScope

public void setScope(java.lang.String scope)
Set the attribute scope of our bean.
Parameters:
scope - The new attribute scope

getStyle

public java.lang.String getStyle()
Return the style attribute for this tag.

setStyle

public void setStyle(java.lang.String style)
Set the style attribute for this tag.
Parameters:
style - The new style attribute

getStyleClass

public java.lang.String getStyleClass()
Return the style class for this tag.

setStyleClass

public void setStyleClass(java.lang.String styleClass)
Set the style class for this tag.
Parameters:
styleClass - The new style class

getStyleId

public java.lang.String getStyleId()
Return the style id for this tag.

setStyleId

public void setStyleId(java.lang.String styleId)
Set the style id for this tag.
Parameters:
styleId - The new style id

getTarget

public java.lang.String getTarget()
Return the window target.

setTarget

public void setTarget(java.lang.String target)
Set the window target.
Parameters:
target - The new window target

getType

public java.lang.String getType()
Return the Java class of our bean.

setType

public void setType(java.lang.String type)
Set the Java class of our bean.
Parameters:
type - The new Java class

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Render the beginning of this form.
Throws:
JspException - if a JSP exception has occurred

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Render the end of this form.
Throws:
JspException - if a JSP exception has occurred

release

public void release()
Release any acquired resources.


Copyright © 2000-2002 - Apache Software Foundation