org.chwf.taglib.jhtml
Class FieldTag

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

public class FieldTag
extends InputTag

Tag handler for the <field> tag.

Author:
Paul Strack
See Also:
Serialized Form

Fields inherited from class org.chwf.taglib.jhtml.InputTag
TRUE_STRING
 
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 org.chwf.plugin.ValidationData
TYPE_CHECKBOX, TYPE_FIXED, TYPE_HIDDEN, TYPE_PASSWORD, TYPE_SELECT, TYPE_TEXT, TYPE_TEXTAREA
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
FieldTag()
           
 
Method Summary
 void cleanup()
          Clean up data for tag handler reuse and pooling.
 int doStart()
          Print the field info.
 java.lang.String getErrorMessage()
          The error message (or null if there is no message).
 boolean hasErrorMessage()
          True if the field has an error message.
 void setAccept(java.lang.String value)
          Pass-through attribute.
 void setAccesskey(java.lang.String value)
          Pass-through attribute.
 void setCols(java.lang.String value)
          Pass-through attribute.
 void setDisabled(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 setMaxlength(java.lang.String value)
          Pass-through attribute.
 void setName(java.lang.String name)
          Calls superclass method.
 void setObject(java.lang.String objectName)
          Calls superclass method.
 void setOptions(java.lang.String options)
          The name of the web application variable containing input items options.
 void setProperty(java.lang.String property)
          Calls superclass method.
 void setRows(java.lang.String value)
          Pass-through attribute.
 void setSize(java.lang.String value)
          Pass-through attribute.
 void setStyle(java.lang.String value)
          Pass-through attribute.
 void setStyleClass(java.lang.String value)
          Pass-through attribute.
 void setTitle(java.lang.String value)
          Pass-through attribute.
 void setType(java.lang.String type)
          Set the input element type.
 void setValidations(java.lang.Boolean validations)
          Whether validations are supported.
 void setWrap(java.lang.String value)
          Pass-through attribute.
 
Methods inherited from class org.chwf.taglib.jhtml.InputTag
getOptionsMap, getType, getValidations, init
 
Methods inherited from class org.chwf.taglib.jhtml.FieldTagSupport
deriveLabel, getBeanFilter, getFieldValue, getFormTag, getLocalizedAttribute, getName, getPropertyAttribute
 
Methods inherited from class org.chwf.taglib.base.ObjectTagSupport
findObject, getEl, getObject, getProperty, getTagResult, getTagResult, getVar, setEl, setVar, storeDefaultObject
 
Methods inherited from class org.chwf.taglib.base.LifeCycleTagSupport
addAttribute, addParameter, doEnd, 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
 
Methods inherited from interface org.chwf.plugin.ValidationData
getLocalizedAttribute, getName, getPropertyAttribute
 

Constructor Detail

FieldTag

public FieldTag()
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 InputTag

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 InputTag
Parameters:
objectName - The object name.
Throws:
javax.servlet.jsp.JspException - For errors.

setProperty

public void setProperty(java.lang.String property)
                 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:
setProperty in class InputTag
Parameters:
property - The property name.
Throws:
javax.servlet.jsp.JspException - For errors.

setName

public void setName(java.lang.String name)
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:
setName in class InputTag
Parameters:
name - The field name.

setType

public void setType(java.lang.String type)
             throws javax.servlet.jsp.JspException
Set the input element type. Optional. The type value is converted to lowercase for consistency with the XHTML standard.
Overrides:
setType in class InputTag
Parameters:
type - The input type.
Throws:
javax.servlet.jsp.JspException - If the type is not one of the known input element types, defined as TYPE_XXX constants.

setValidations

public void setValidations(java.lang.Boolean validations)
Whether validations are supported. If not specified, defaults to value in nesting formtag.
Overrides:
setValidations in class InputTag
Parameters:
validations - Whether validations are supported.

setOptions

public void setOptions(java.lang.String options)
The name of the web application variable containing input items options.
Overrides:
setOptions in class InputTag
Parameters:
options - The variable name for options.

setStyleClass

public void setStyleClass(java.lang.String value)
Pass-through attribute. Same meaning as "class" in HTML.
Overrides:
setStyleClass in class InputTag
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 InputTag
Parameters:
value - The attribute value.

setLang

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

setStyle

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

setTitle

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

setAccept

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

setAccesskey

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

setDisabled

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

setMaxlength

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

setSize

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

setCols

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

setRows

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

setWrap

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

hasErrorMessage

public boolean hasErrorMessage()
True if the field has an error message.
Returns:
True if the field has an error message.

getErrorMessage

public java.lang.String getErrorMessage()
The error message (or null if there is no message).
Returns:
The error message.

doStart

public int doStart()
            throws java.io.IOException,
                   javax.servlet.jsp.JspException
Print the field info.
Overrides:
doStart in class InputTag
Returns:
SKIP_BODY
Throws:
javax.servlet.jsp.JspException - If the property cannot be initialized.
java.io.IOException - For IO exceptions.


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