|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.servlet.jsp.tagext.TagSupport | +--javax.servlet.jsp.tagext.BodyTagSupport | +--org.apache.taglibs.datetime.MonthsTag
JSP Tag months, used to loop through all the months of the year so that month names can be accessed by using the standard JSP <jsp:getProperty> tag.
The script variable of name id is availble only within the body of the months tag.
Loops through all the months.
If the optional attribute locale is true, the month names are formatted for the clients locale if known.
The optional attribute localeRef can be used to specify the name of a page, session, application, or request scope attribute of type java.util.Locale to use.
JSP Tag Lib Descriptor
<name>months</name> <tagclass>org.apache.taglibs.datetime.MonthsTag</tagclass> <teiclass>org.apache.taglibs.datetime.MonthsTEI</teiclass> <bodycontent>JSP</bodycontent> <info>Loop through all the months of the year.</info> <attribute> <name>id</name> <required>true</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>locale</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>localeRef</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute>
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
bodyContent |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id, pageContext |
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag |
EVAL_BODY_TAG |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Constructor Summary | |
MonthsTag()
|
Method Summary | |
int |
doAfterBody()
Method called at end of each months tag. |
int |
doEndTag()
Method called at end of Tag |
int |
doStartTag()
Initializes tag so it can loop through the months of the year. |
java.lang.String |
getMonth()
Returns the long name of the month. |
java.lang.String |
getMonthOfYear()
Returns the number of the month. |
java.lang.String |
getShortMonth()
Returns the short name of the month. |
void |
setLocale(boolean flag)
Locale flag, if set to true, use month names for client's preferred locale if known. |
void |
setLocaleRef(java.lang.String value)
Provides a key to search the page context for in order to get the java.util.Locale to use. |
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
doInitBody, getBodyContent, getPreviousOut, release, setBodyContent |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.servlet.jsp.tagext.Tag |
getParent, setPageContext, setParent |
Constructor Detail |
public MonthsTag()
Method Detail |
public final int doStartTag() throws javax.servlet.jsp.JspException
doStartTag
in class javax.servlet.jsp.tagext.BodyTagSupport
public final int doAfterBody() throws javax.servlet.jsp.JspException
doAfterBody
in class javax.servlet.jsp.tagext.BodyTagSupport
public final int doEndTag() throws javax.servlet.jsp.JspException
doEndTag
in class javax.servlet.jsp.tagext.BodyTagSupport
public final void setLocale(boolean flag)
boolean
- either true or falsepublic final java.lang.String getShortMonth()
<jsp:getProperty name="id" property="shortMonth"/>
public final java.lang.String getMonth()
<jsp:getProperty name="id" property="month"/>
public void setLocaleRef(java.lang.String value)
String
- name of locale attribute to usepublic final java.lang.String getMonthOfYear()
<jsp:getProperty name="id" property="monthOfYear"/>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |