Package org.apache.wiki.tags

# Class CalendarTag

java.lang.Object
jakarta.servlet.jsp.tagext.TagSupport
org.apache.wiki.tags.WikiTagBase
org.apache.wiki.tags.CalendarTag

All Implemented Interfaces:
  `jakarta.servlet.jsp.tagext.IterationTag`, `jakarta.servlet.jsp.tagext.JspTag`, `jakarta.servlet.jsp.tagext.Tag`, `jakarta.servlet.jsp.tagext.TryCatchFinally`, `Serializable`

public class CalendarTag extends WikiTagBase
Provides a nice calendar. Responds to the following HTTP parameters:

- calendar.date - If this parameter exists, then the calendar date is taken from the month and year. The date must be in ddMMyy format.
- weblog.startDate - If calendar.date parameter does not exist, we then check this date.

If neither calendar.date nor weblog.startDate parameters exist, then the calendar will default to the current month.

Since:
  2.0
See Also:
  - Serialized Form

## Field Summary

### Fields inherited from class org.apache.wiki.tags.WikiTagBase

`m_wikiContext`

### Fields inherited from class jakarta.servlet.jsp.tagext.TagSupport

`id, pageContext`

### Fields inherited from interface jakarta.servlet.jsp.tagext.IterationTag

`EVAL_BODY_AGAIN`

### Fields inherited from interface jakarta.servlet.jsp.tagext.Tag

`EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE`

## Constructor Summary

Constructors
Constructor
Description
`CalendarTag()`

## Method Summary

Modifier and Type
Method
Description
`final int`
`doWikiStartTag()`
This method is allowed to do pretty much whatever he wants.
`void`
`initTag()`
This method is called when the tag is encountered within a new request, but before the setXXX() methods are called.
`void`
`setAddindex(boolean addIndex)`
Sets whether or not the pageFormat contains a page index at the end.
`void`
`setMonthurlformat(String format)`
Set the format to be used for links for the months.
`void`
`setPageformat(String format)`
Sets the page format.
`void`
`setUrlformat(String format)`
Set the URL format.

### Methods inherited from class org.apache.wiki.tags.WikiTagBase

`doCatch, doEndTag, doFinally, doStartTag, setId, setPageContext`

### Methods inherited from class jakarta.servlet.jsp.tagext.TagSupport

`doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setParent, setValue`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### CalendarTag

public CalendarTag()

## Method Details

### initTag

public void initTag()
This method is called when the tag is encountered within a new request, but before the setXXX() methods are called. The default implementation does nothing.

Overrides:
  `initTag` in class `WikiTagBase`

### setPageformat

public void setPageformat(String format)
Sets the page format. If a page corresponding to the format is found when the calendar is being rendered, a link to that page is created. E.g. if the format is set to `'Main_blogentry_'ddMMyy`, it works nicely in conjunction to the WeblogPlugin.

Parameters:
  `format` - The format in the SimpleDateFormat fashion.
See Also:
  - `SimpleDateFormat`
  - `WeblogPlugin`

### setUrlformat

public void setUrlformat(String format)
Set the URL format. If the pageformat is not set, all dates are links to pages according to this format. The pageformat takes precedence.

Parameters:
  `format` - The URL format in the SimpleDateFormat fashion.
See Also:
  - `SimpleDateFormat`

### setMonthurlformat

public void setMonthurlformat(String format)
Set the format to be used for links for the months.

Parameters:
  `format` - The format to set in the SimpleDateFormat fashion.
See Also:
  - `SimpleDateFormat`

### setAddindex

public void setAddindex(boolean addIndex)
Sets whether or not the pageFormat contains a page index at the end. This is the case for the WeblogPlugin.

Parameters:
  `addindex` - Whether a page index should be appended to the pageFormat
See Also:
  - `WeblogPlugin`

### doWikiStartTag

public final int doWikiStartTag() throws IOException
This method is allowed to do pretty much whatever he wants. We then catch all mistakes.

Specified by:
  `doWikiStartTag` in class `WikiTagBase`
Throws:
  `IOException`