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:
BodyTag, IterationTag, Serializable, 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.55 2006/07/12 09:36:50 michiel Exp $
Author:
Rob Vermeulen (VPRO), Michiel Meeuwissen
See Also:
Serialized Form

Field Summary
protected  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()
           
 Date getDate()
          You could implement a tag for the body of time-tag, which can then receive the date-object.
protected  SimpleDateFormat getDateFormat()
          DateFormat used for parsing dates.
protected  DateFormat getFormat()
           
protected  int getPrecisionConstant(String p)
           
 TimeZone getTimeZone()
           
 void release()
          Release all allocated resources.
 void setFormat(String f)
           
 void setInputformat(String inputformat)
           
 void setOffset(String offset)
           
 void setPrecision(String p)
           
 void setRelevance(String p)
           
 void setTime(String time)
           
 void setTimezone(String tz)
           
 
Methods inherited from class org.mmbase.bridge.jsp.taglib.ContextReferrerTag
fillStandardParameters, findLoopOrQuery, findParentTag, findParentTag, findParentTag, findParentTag, findWriter, findWriter, getAttribute, getAttributeBoolean, getAttributeInteger, getAttributeInteger, getAttributeValue, getContentTag, getContextProvider, getContextTag, getDefaultLocale, getEscapedValue, getId, getLocale, getObject, getObjectConditional, getPageContext, getPageContextTag, getReferid, getString, getTaglibVersion, getWriterValue, haveBody, setContext, setEscape, setId, setJspvar, setListdelimiter, 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 Date _date
Since:
MMBase-1.7.1
Constructor Detail

TimeTag

public TimeTag()
Method Detail

setTime

public void setTime(String time)
             throws JspTagException
Throws:
JspTagException

setFormat

public void setFormat(String f)
               throws JspTagException
Throws:
JspTagException

setPrecision

public void setPrecision(String p)
                  throws JspTagException
Throws:
JspTagException

getPrecisionConstant

protected int getPrecisionConstant(String p)
                            throws JspTagException
Throws:
JspTagException

setRelevance

public void setRelevance(String p)
                  throws JspTagException
Throws:
JspTagException

getTimeZone

public TimeZone getTimeZone()
Overrides:
getTimeZone in class ContextReferrerTag

getFormat

protected DateFormat getFormat()
                        throws JspTagException
Throws:
JspTagException

setInputformat

public void setInputformat(String inputformat)
                    throws JspTagException
Throws:
JspTagException

setOffset

public void setOffset(String offset)
               throws JspTagException
Throws:
JspTagException

setTimezone

public void setTimezone(String tz)
                 throws JspTagException
Throws:
JspTagException

getDate

public 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 JspTagException
Specified by:
doStartTag in interface Tag
Throws:
JspTagException

doAfterBody

public int doAfterBody()
                throws JspException
Specified by:
doAfterBody in interface IterationTag
Throws:
JspException

doEndTag

public int doEndTag()
             throws JspTagException
Specified by:
doEndTag in interface Tag
Overrides:
doEndTag in class ContextReferrerTag
Throws:
JspTagException

release

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

Specified by:
release in interface Tag
Overrides:
release in class ContextReferrerTag

getDateFormat

protected SimpleDateFormat getDateFormat()
                                  throws JspTagException
DateFormat used for parsing dates.

Throws:
JspTagException


MMBase build 1.8.1.20060716