com.ivata.mask.web.tag.format
Class FormatDateTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended bycom.ivata.mask.web.tag.format.FormatDateTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.IterationTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag

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

This class wraps the DateFormatter class, so that you can call DateFormatter.format as a JSP tag.

Tag attributes:

attribute reqd. param. class description
date true com.ivata.util.DateFormatter Sets the date to be formatted into a string.
formatter true com.ivata.util.DateFormatter Sets the formatter which actually does the formatting.

Since:
ivata masks 0.5 (2002-06-22)
Version:
$Revision: 1.2 $
Author:
Colin MacLeod colin.macleod@ivata.com
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
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
FormatDateTag()
           
 
Method Summary
 int doStartTag()
          This method is called when the JSP engine encounters the start tag, after the attributes are processed.
 java.util.Date getDate()
          Get the date which will be formatted into a string when this tag is used.
 DateFormatter getFormatter()
           This date formatter will do all the hard work.
 void setDate(java.util.Date dateParam)
          Set the date which will be formatted into a string when this tag is used.
 void setFormatter(DateFormatter formatterParam)
           This date formatter will do all the hard work.
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormatDateTag

public FormatDateTag()
Method Detail

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException

This method is called when the JSP engine encounters the start tag, after the attributes are processed.

Scripting variables (if any) have their values set here.

Returns:
SKIP_BODY since this tag has no body.
Throws:
javax.servlet.jsp.JspException - if any of the attributes have invalid values.
javax.servlet.jsp.JspException - if there is any excpetion calling out.print.

getDate

public final java.util.Date getDate()

Get the date which will be formatted into a string when this tag is used.

Returns:
the current value of the date to be formatted into a string.

getFormatter

public final DateFormatter getFormatter()

This date formatter will do all the hard work.

Returns:
current value of dateFormatter.

setDate

public final void setDate(java.util.Date dateParam)

Set the date which will be formatted into a string when this tag is used.

Parameters:
dateParam - the new value of the date to be formatted into a string.

setFormatter

public final void setFormatter(DateFormatter formatterParam)

This date formatter will do all the hard work.

Parameters:
formatterParam - new value of date formatter.


Copyright © 2001-2005 ivata limited. All Rights Reserved.