net.ontopia.topicmaps.webed.taglibs.form
Class FieldTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by net.ontopia.topicmaps.webed.taglibs.form.FieldTag
All Implemented Interfaces:
Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class FieldTag
extends javax.servlet.jsp.tagext.BodyTagSupport

INTERNAL: Custom tag for input fields (of type "text", "textarea", "password", or "hidden") in an HTML form.

See Also:
Serialized Form

Field Summary
protected  String action_name
           
protected  String fieldtype_name
           
protected  String id
           
protected  String klass
           
protected  String params
           
protected  String pattern
           
protected  String readonly
           
protected static String TEMPLATE_FILE
          The default location where the velocity template can be retrieved from.
protected  String trim
           
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
FieldTag()
           
 
Method Summary
 int doEndTag()
          Renders the input field element with it's content.
 int doStartTag()
          Process the start tag, do nothing.
 void release()
          Release any acquired resources.
 void setAction(String action_name)
          Sets the name of the related action.
 void setClass(String klass)
          Sets the class attribute of the tag.
 void setId(String id)
          Sets the id of the tag.
 void setParams(String params)
          Sets the variable name(s) of the parameter(s) transmitted to the action, separated by whitespaces.
 void setPattern(String pattern)
          Sets regular expression against which value must validate.
 void setReadonly(String readonly)
          Sets the the readonly flag of the tag.
 void setTrim(String trim)
          Specify whether the contained string should be trimmed for white-space, i.e.
 void setType(String fieldtype_name)
          Sets the name of the input field type.
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, 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 javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Field Detail

TEMPLATE_FILE

protected static final String TEMPLATE_FILE
The default location where the velocity template can be retrieved from.

See Also:
Constant Field Values

id

protected String id

readonly

protected String readonly

klass

protected String klass

action_name

protected String action_name

pattern

protected String pattern

params

protected String params

fieldtype_name

protected String fieldtype_name

trim

protected String trim
Constructor Detail

FieldTag

public FieldTag()
Method Detail

doStartTag

public int doStartTag()
Process the start tag, do nothing.

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.servlet.jsp.tagext.BodyTagSupport
Returns:
EVAL_BODY_INCLUDE

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Renders the input field element with it's content.

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class javax.servlet.jsp.tagext.BodyTagSupport
Throws:
javax.servlet.jsp.JspException

release

public void release()
Release any acquired resources.

Specified by:
release in interface javax.servlet.jsp.tagext.Tag
Overrides:
release in class javax.servlet.jsp.tagext.BodyTagSupport

setId

public void setId(String id)
Sets the id of the tag. This value will be used as the value of an ID attribute in the generated output.

Overrides:
setId in class javax.servlet.jsp.tagext.TagSupport

setReadonly

public void setReadonly(String readonly)
Sets the the readonly flag of the tag.


setClass

public void setClass(String klass)
Sets the class attribute of the tag. This value will be used as the value of the 'class' attribute in the generated output.


setAction

public void setAction(String action_name)
Sets the name of the related action.


setPattern

public void setPattern(String pattern)
Sets regular expression against which value must validate.


setType

public void setType(String fieldtype_name)
Sets the name of the input field type. This must map to a 'name' attribute value of a field definition in the action configuration file.


setParams

public void setParams(String params)
Sets the variable name(s) of the parameter(s) transmitted to the action, separated by whitespaces. Specifying parameters is optional.


setTrim

public void setTrim(String trim)
Specify whether the contained string should be trimmed for white-space, i.e. whether leading and trailing spaces should be removed. Spaces will be removed by default.



Copyright © 2000-2012 Ontopia.