hu.midori.kosmos.portlet.taglib
Class AgeTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by hu.midori.kosmos.portlet.taglib.AgeTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

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

Displays localized "age" information: time difference between "now" and the given "birth" value, in the most appropriate unit of minutes, hours, days, weeks and such. It uses the Locale set for JSTL, so doesn't require additional configuration.

Version:
$Id$
Author:
Aron Gombas
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
AgeTag()
           
 
Method Summary
 int doStartTag()
           
 void setTime(java.lang.String time)
          Sets the millisecond of the "birth" value used for computing the age.
 
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

AgeTag

public AgeTag()
Method Detail

setTime

public void setTime(java.lang.String time)
Sets the millisecond of the "birth" value used for computing the age.


doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.servlet.jsp.tagext.TagSupport
Throws:
javax.servlet.jsp.JspException