org.mmbase.bridge.jsp.taglib
Class TimeTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byjavax.servlet.jsp.tagext.BodyTagSupport
          extended byorg.mmbase.bridge.jsp.taglib.ContextReferrerTag
              extended byorg.mmbase.bridge.jsp.taglib.TimeTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag, Writer, WriterReferrer

public class TimeTag
extends ContextReferrerTag
implements Writer, WriterReferrer

The time taglib provides you easy functionality for using times in your web pages.

Since:
MMBase-1.6
Version:
$Id: TimeTag.java,v 1.40.2.2 2004/07/12 07:31:23 michiel Exp $
Author:
Rob Vermeulen (VPRO), Michiel Meeuwissen
See Also:
Serialized Form

Field Summary
protected  java.util.Date date
           
 
Fields inherited from class org.mmbase.bridge.jsp.taglib.ContextReferrerTag
contextId, EVAL_BODY, helper, id, pageContextTag, referid, writerid
 
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
TimeTag()
           
 
Method Summary
 int doAfterBody()
           
 int doEndTag()
           
 int doStartTag()
           
 java.util.Date getDate()
          You could implement a tag for the body of time-tag, which can then receive the date-object.
protected  java.text.SimpleDateFormat getDateFormat()
          DateFormat used for parsing dates.
protected  java.text.DateFormat getFormat()
           
protected  int getPrecisionConstant(java.lang.String p)
           
 void release()
          Release all allocated resources.
 void setFormat(java.lang.String f)
           
 void setInputformat(java.lang.String inputformat)
           
 void setOffset(java.lang.String offset)
           
 void setPrecision(java.lang.String p)
           
 void setRelevance(java.lang.String p)
           
 void setTime(java.lang.String time)
           
 void setTimezone(java.lang.String tz)
           
 
Methods inherited from class org.mmbase.bridge.jsp.taglib.ContextReferrerTag
findParentTag, findParentTag, findParentTag, findParentTag, findWriter, findWriter, getAttribute, getAttributeBoolean, getAttributeInteger, getAttributeInteger, getAttributeValue, getContentTag, getContextProvider, getContextTag, getId, getLocale, getObject, getPageContext, getReferid, getString, getWriterValue, haveBody, setContext, setEscape, setId, setJspvar, setPageContext, setReferid, setVartype, setWrite, setWriter
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doInitBody, getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getParent, getValue, getValues, removeValue, 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.mmbase.bridge.jsp.taglib.Writer
getWriterValue, haveBody, setEscape, setJspvar, setVartype, setWrite
 
Methods inherited from interface org.mmbase.bridge.jsp.taglib.WriterReferrer
findWriter, setWriter
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setParent
 

Field Detail

date

protected java.util.Date date
Since:
MMBase-1.7.1
Constructor Detail

TimeTag

public TimeTag()
Method Detail

setTime

public void setTime(java.lang.String time)
             throws javax.servlet.jsp.JspTagException
Throws:
javax.servlet.jsp.JspTagException

setFormat

public void setFormat(java.lang.String f)
               throws javax.servlet.jsp.JspTagException
Throws:
javax.servlet.jsp.JspTagException

setPrecision

public void setPrecision(java.lang.String p)
                  throws javax.servlet.jsp.JspTagException
Throws:
javax.servlet.jsp.JspTagException

getPrecisionConstant

protected int getPrecisionConstant(java.lang.String p)
                            throws javax.servlet.jsp.JspTagException
Throws:
javax.servlet.jsp.JspTagException

setRelevance

public void setRelevance(java.lang.String p)
                  throws javax.servlet.jsp.JspTagException
Throws:
javax.servlet.jsp.JspTagException

getFormat

protected java.text.DateFormat getFormat()
                                  throws javax.servlet.jsp.JspTagException
Throws:
javax.servlet.jsp.JspTagException

setInputformat

public void setInputformat(java.lang.String inputformat)
                    throws javax.servlet.jsp.JspTagException
Throws:
javax.servlet.jsp.JspTagException

setOffset

public void setOffset(java.lang.String offset)
               throws javax.servlet.jsp.JspTagException
Throws:
javax.servlet.jsp.JspTagException

setTimezone

public void setTimezone(java.lang.String tz)
                 throws javax.servlet.jsp.JspTagException
Throws:
javax.servlet.jsp.JspTagException

getDate

public java.util.Date getDate()
You could implement a tag for the body of time-tag, which can then receive the date-object.

Since:
MMBase-1.7.1
To Do:
Don't we use getCalendar (to get Locales right)

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspTagException
Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Throws:
javax.servlet.jsp.JspTagException

doAfterBody

public int doAfterBody()
                throws javax.servlet.jsp.JspException
Specified by:
doAfterBody in interface javax.servlet.jsp.tagext.IterationTag
Throws:
javax.servlet.jsp.JspException

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspTagException
Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class ContextReferrerTag
Throws:
javax.servlet.jsp.JspTagException

release

public void release()
Description copied from class: ContextReferrerTag
Release all allocated resources.

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

getDateFormat

protected java.text.SimpleDateFormat getDateFormat()
                                            throws javax.servlet.jsp.JspTagException
DateFormat used for parsing dates.

Throws:
javax.servlet.jsp.JspTagException


MMBase build 1.7.1.20041002