com.taggercat.tags
Class DataFieldValueTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by com.taggercat.tags.DataFieldValueTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class DataFieldValueTag
extends javax.servlet.jsp.tagext.TagSupport

This tag returns the value of the named field of the data source.
If an error has occurred (usually preventing a save) on this request/response cycle then the data from the request, and not from the model is used. Therefore, the user will not lose the data they just entered when errors occur. If there is no corresponding parameter on the request, then the value from the data source is used.

See Also:
Serialized Form
 

Field Summary
 
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
DataFieldValueTag()
           
 
Method Summary
 int doEndTag()
          Resets the tags internal state.
 int doStartTag()
          Sends the value of the specified property to the page.
 int getTruncate()
           
 void setDsn(java.lang.String dsn)
          Set the name of the data source this field is a member of.
 void setField(java.lang.String field)
          Sets the field name attribute.
 void setFormat(java.lang.String format)
          Sets the format string.
 void setNulls(java.lang.String nulls)
          Sets the null representation.
 void setPreserveHTML(boolean preserveHTML)
          Sets the preserveHTML field, set true to retain the original HTML.
 void setTruncate(int truncateAt)
           
 void setUseCodeTableValue(boolean useCodeTableValue)
          Sets the useCodeTableValue attribute
 java.lang.String toString()
          Returns a description of this object.
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataFieldValueTag

public DataFieldValueTag()
Method Detail

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Resets the tags internal state.

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

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Sends the value of the specified property to the page.

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.servlet.jsp.tagext.TagSupport
Throws:
javax.servlet.jsp.JspException
Returns:
SKIP_BODY

setDsn

public void setDsn(java.lang.String dsn)
Set the name of the data source this field is a member of.

Parameters:
dsn - The new dsn value

setField

public void setField(java.lang.String field)
Sets the field name attribute.

Parameters:
field - The new field value

setFormat

public void setFormat(java.lang.String format)
Sets the format string.

Parameters:
format - The new format value

setNulls

public void setNulls(java.lang.String nulls)
Sets the null representation.

Parameters:
nulls - the new null representation

setUseCodeTableValue

public void setUseCodeTableValue(boolean useCodeTableValue)
Sets the useCodeTableValue attribute

Parameters:
useCodeTableValue - the new useCodeTableValue state

setPreserveHTML

public void setPreserveHTML(boolean preserveHTML)
Sets the preserveHTML field, set true to retain the original HTML.

Parameters:
preserveHTML - the new preserveHTML state

getTruncate

public int getTruncate()

setTruncate

public void setTruncate(int truncateAt)

toString

public java.lang.String toString()
Returns a description of this object.

Overrides:
toString in class java.lang.Object
Returns:
a listing of the current attributes