|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
org.deltava.taglib.format.DateFormatTag
public class DateFormatTag
A JSP tag to support the display of formatted date/time values.
| 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 | |
|---|---|
DateFormatTag()
|
|
| Method Summary | |
|---|---|
int |
doEndTag()
Formats the date/time and writes it to the JSP output writer. |
int |
doStartTag()
Mashes the date and time together in a date/time object. |
void |
release()
Releases this tag's state variables. |
void |
setClassName(String cName)
Updates the CSS class for this formatted date/time. |
void |
setD(String pattern)
Updates the date format pattern. |
void |
setDate(Date d)
Sets the date/time to display. |
void |
setDefault(String defaultText)
Updates the text to display if the date is null. |
void |
setFmt(String dtFmt)
Sets what components of the date/time to display. |
void |
setPageContext(PageContext ctxt)
Updates this tag's page context and loads the user object from the request. |
void |
setShowZone(boolean showZone)
Overrides whether the time zone should be displayed. |
void |
setT(String pattern)
Updates the time format pattern. |
void |
setTz(TZInfo tz)
Overrides the time zone used to display the date/time with. |
void |
setTzName(String tzName)
Overrides the time zone used to display the date/time with. |
| Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
|---|
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setParent, setValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DateFormatTag()
| Method Detail |
|---|
public final void setPageContext(PageContext ctxt)
setPageContext in interface TagsetPageContext in class TagSupportctxt - the new JSP page contextpublic void setClassName(String cName)
cName - the class Name(s)public void setD(String pattern)
pattern - the pattern string
IllegalArgumentException - if SimpleDateFormat cannot interpret the patternSimpleDateFormat.applyPattern(String)public void setDefault(String defaultText)
defaultText - the text to displaypublic void setT(String pattern)
pattern - the pattern string
IllegalArgumentException - if SimpleDateFormat cannot interpret the patternSimpleDateFormat.applyPattern(String)public void setFmt(String dtFmt)
dtFmt - "dt" to show date/time, "d" for date only, "t" for time onlypublic void setDate(Date d)
d - the date/time
NullPointerException - if d is nullpublic void setTz(TZInfo tz)
tz - the time zonepublic void setTzName(String tzName)
tzName - the time zone namepublic void setShowZone(boolean showZone)
showZone - TRUE if the time zone should be displayed, otherwise FALSEDateTime.showZone(boolean)public void release()
release in interface Tagrelease in class TagSupport
public int doStartTag()
throws JspException
doStartTag in interface TagdoStartTag in class TagSupportJspException - if an error occurs
public int doEndTag()
throws JspException
doEndTag in interface TagdoEndTag in class TagSupportJspException - if an error occurs
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||