org.chwf.taglib.jhtml
Class FormTag

java.lang.Object
  |
  +--javax.servlet.jsp.tagext.TagSupport
        |
        +--org.chwf.taglib.base.LifeCycleTagSupport
              |
              +--org.chwf.taglib.base.ObjectTagSupport
                    |
                    +--org.chwf.taglib.jhtml.FormTag
All Implemented Interfaces:
Parameterized, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class FormTag
extends ObjectTagSupport

Tag handler for the <form> tag.

Author:
Paul Strack
See Also:
Serialized Form

Fields inherited from class org.chwf.taglib.base.ObjectTagSupport
DEFAULT_OBJECT
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
FormTag()
           
 
Method Summary
 void cleanup()
          Clean up data for tag handler reuse and pooling.
 int doEnd()
          Prints close tag.
 int doStart()
          Initializes form data and prints open tag.
 java.lang.String getAction()
          The form action.
 java.lang.Boolean getValidations()
          Whether validations are supported.
 void init()
          Initialization.
 void setAccept(java.lang.String value)
          Pass-through attribute.
 void setAction(java.lang.String action)
          Sets the action.
 void setEnctype(java.lang.String value)
          Pass-through attribute.
 void setId(java.lang.String value)
          Pass-through attribute.
 void setLang(java.lang.String value)
          Pass-through attribute.
 void setMethod(java.lang.String value)
          Pass-through attribute.
 void setName(java.lang.String value)
          Pass-through attribute.
 void setObject(java.lang.String objectName)
          Calls superclass method.
 void setStyle(java.lang.String value)
          Pass-through attribute.
 void setStyleClass(java.lang.String value)
          Pass-through attribute.
 void setTarget(java.lang.String value)
          Pass-through attribute.
 void setTitle(java.lang.String value)
          Pass-through attribute.
 void setValidations(java.lang.Boolean validations)
          Whether validations are supported.
 
Methods inherited from class org.chwf.taglib.base.ObjectTagSupport
findObject, getEl, getObject, getProperty, getTagResult, getTagResult, getVar, setEl, setProperty, setVar, storeDefaultObject
 
Methods inherited from class org.chwf.taglib.base.LifeCycleTagSupport
addAttribute, addParameter, doEndTag, doStartTag, getAttribute, getAttributeNames, getParameter, getParameterNames, printAttributes
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormTag

public FormTag()
Method Detail

cleanup

public void cleanup()
Clean up data for tag handler reuse and pooling. Should be overridden in tag handler. Subclasses should always invoke their superclass's cleanup method: super.cleanup()
Overrides:
cleanup in class ObjectTagSupport

setAction

public void setAction(java.lang.String action)
Sets the action. Required. If using site-relative URI (those beginning with a "/"), do not include the context path.
Parameters:
action - The form action.

getAction

public java.lang.String getAction()
The form action.
Returns:
The form action.

setObject

public void setObject(java.lang.String objectName)
               throws javax.servlet.jsp.JspException
Calls superclass method. Is present here because of a bug in some servlet engines that requires tag attibute setters to be defined in the tag class itself.
Overrides:
setObject in class ObjectTagSupport
Parameters:
objectName - The object name.
Throws:
javax.servlet.jsp.JspException - For errors.

setValidations

public void setValidations(java.lang.Boolean validations)
Whether validations are supported.
Parameters:
validations - Whether validations are supported.

getValidations

public java.lang.Boolean getValidations()
Whether validations are supported. May be null.
Returns:
Whether validations are supported.

setStyleClass

public void setStyleClass(java.lang.String value)
Pass-through attribute. Same meaning as "class" in HTML.
Parameters:
value - The attribute value.

setId

public void setId(java.lang.String value)
Pass-through attribute. Same meaning as in HTML.
Overrides:
setId in class javax.servlet.jsp.tagext.TagSupport
Parameters:
value - The attribute value.

setLang

public void setLang(java.lang.String value)
Pass-through attribute. Same meaning as in HTML.
Parameters:
value - The attribute value.

setStyle

public void setStyle(java.lang.String value)
Pass-through attribute. Same meaning as in HTML.
Parameters:
value - The attribute value.

setTitle

public void setTitle(java.lang.String value)
Pass-through attribute. Same meaning as in HTML.
Parameters:
value - The attribute value.

setAccept

public void setAccept(java.lang.String value)
Pass-through attribute. Same meaning as in HTML.
Parameters:
value - The attribute value.

setEnctype

public void setEnctype(java.lang.String value)
Pass-through attribute. Same meaning as in HTML.
Parameters:
value - The attribute value.

setMethod

public void setMethod(java.lang.String value)
Pass-through attribute. Same meaning as in HTML.
Parameters:
value - The attribute value.

setName

public void setName(java.lang.String value)
Pass-through attribute. Same meaning as in HTML.
Parameters:
value - The attribute value.

setTarget

public void setTarget(java.lang.String value)
Pass-through attribute. Same meaning as in HTML.
Parameters:
value - The attribute value.

init

public void init()
          throws javax.servlet.jsp.JspException
Initialization. Makes "method" attribute default to "post".
Overrides:
init in class LifeCycleTagSupport
Throws:
javax.servlet.jsp.JspException - For errors.

doStart

public int doStart()
            throws java.io.IOException,
                   javax.servlet.jsp.JspException
Initializes form data and prints open tag.
Overrides:
doStart in class LifeCycleTagSupport
Returns:
EVAL_BODY_INCLUDE
Throws:
javax.servlet.jsp.JspException - If object not defined.
java.io.IOException - For write errors.

doEnd

public int doEnd()
          throws java.io.IOException
Prints close tag.
Overrides:
doEnd in class LifeCycleTagSupport
Returns:
EVAL_PAGE
Throws:
java.io.IOException - For write errors.


Copyright © 2002-2004, Paul Strack. All Rights Reserved.