Class WeeklyCalendarTag
java.lang.Object
jakarta.servlet.jsp.tagext.TagSupport
org.deltava.taglib.calendar.CalendarTag
org.deltava.taglib.calendar.WeeklyCalendarTag
- All Implemented Interfaces:
jakarta.servlet.jsp.tagext.IterationTag, jakarta.servlet.jsp.tagext.JspTag, jakarta.servlet.jsp.tagext.Tag, Serializable
A JSP tag to generate a weekly Calendar.
- Since:
- 1.0
- Version:
- 12.3
- Author:
- Luke
- See Also:
-
Field Summary
Fields inherited from class CalendarTag
_border, _contentClass, _currentDate, _day, _dayBarClass, _endDate, _entries, _intervalLength, _intervalType, _out, _showDaysOfWeek, _startDate, _table, _tableClass, _tableID, _today, _topBarClass, _tzModifier and TypeFieldDescriptionprotected intprotected Stringprotected ZonedDateTimeprotected XMLRendererprotected Stringprotected ZonedDateTimeprotected final Collection<CalendarEntry> protected intprotected ChronoUnitprotected jakarta.servlet.jsp.JspWriterprotected booleanprotected ZonedDateTimeprotected XMLRendererprotected Stringprotected Stringprotected ZonedDateTimeprotected Stringprotected ZoneIdFields inherited from class jakarta.servlet.jsp.tagext.TagSupport
id, pageContextFields inherited from interface jakarta.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface jakarta.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintExecuted after the end of each day.intdoEndTag()Closes the calendar table.intRenders the Calendar header to the JSP output stream.protected StringReturns the label for the scroll backwards link.protected StringReturns the label for the scroll forwards linkvoidSets the starting date for this calendar tag.Methods inherited from class CalendarTag
calculateEndDate, getContentClass, getCurrentEntries, getHeaderClass, multiFilter, release, setBorder, setCmd, setContentClass, setDate, setDayBarClass, setEntries, setMultipleDays, setPageContext, setScrollClass, setScrollTags, setShowDaysOfWeek, setTableClass, setTableID, setTopBarClassModifier and TypeMethodDescriptionprotected voidcalculateEndDate(ChronoUnit intervalType, int amount) Calculates the end date based on the start date and a particular interval amount.protected StringCalculates the CSS class(es) for the content table cell.(package private) Collection<CalendarEntry> Returns all Calendar entries for the currently rendered Date, from midnight to 11:59PM.protected StringCalculates the CSS class(es) for the header table cell.static booleanmultiFilter(CalendarEntry ce, DateRange dr) voidrelease()voidsetBorder(int border) Sets the BORDER value for this table.voidSets the command name to use when scrolling the view.voidsetContentClass(String cName) Sets the CSS class name for the view table content bar.voidSets the request attribute name for the current date.voidsetDayBarClass(String cName) Sets the CSS class name for the view table day bar.final voidsetEntries(Collection<CalendarEntry> entries) Sets the entries to display in this calendar view table.voidsetMultipleDays(boolean doMultiDays) Sets whether to include an entry that spans multiple days to be included on each day.voidsetPageContext(jakarta.servlet.jsp.PageContext ctx) Sets the page context for the tag, and sets the user's time zone.voidsetScrollClass(String cName) Sets the CSS class name for the forwad/backward scroll links.voidsetScrollTags(boolean showScroll) Sets whether to display the forward/backward scroll tags.voidsetShowDaysOfWeek(boolean showDOW) Sets whether the days of the week should be displayed below the title bar.voidsetTableClass(String cName) Sets the CSS class name for the view table.voidsetTableID(String id) Sets the CSS ID for the view table.voidsetTopBarClass(String cName) Sets the CSS class name for the view table title bar.Methods inherited from class jakarta.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setParent, setValue
-
Constructor Details
-
WeeklyCalendarTag
public WeeklyCalendarTag()
-
-
Method Details
-
setStartDate
Sets the starting date for this calendar tag. This is overriden to be the first day of the week (Sunday).- Specified by:
setStartDatein classCalendarTag- Parameters:
dt- the start date- See Also:
-
getBackLabel
Description copied from class:CalendarTagReturns the label for the scroll backwards link.- Specified by:
getBackLabelin classCalendarTag- Returns:
- the link label
- See Also:
-
getForwardLabel
Description copied from class:CalendarTagReturns the label for the scroll forwards link- Specified by:
getForwardLabelin classCalendarTag- Returns:
- the link label
- See Also:
-
doStartTag
public int doStartTag() throws jakarta.servlet.jsp.JspExceptionRenders the Calendar header to the JSP output stream.- Specified by:
doStartTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doStartTagin classCalendarTag- Returns:
- TagSupport.EVAL_BODY_INCLUDE always
- Throws:
jakarta.servlet.jsp.JspException- if an I/O error occurs
-
doAfterBody
public int doAfterBody() throws jakarta.servlet.jsp.JspExceptionExecuted after the end of each day. The day table cell is closed and the superclass tag is called to determine if further records are required.- Specified by:
doAfterBodyin interfacejakarta.servlet.jsp.tagext.IterationTag- Overrides:
doAfterBodyin classCalendarTag- Returns:
- TagSupport.EVAL_BODY_AGAIN if not at end of month, otherwise TagSupport.SKIP_BODY
- Throws:
jakarta.servlet.jsp.JspException- never
-
doEndTag
public int doEndTag() throws jakarta.servlet.jsp.JspExceptionCloses the calendar table.- Specified by:
doEndTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doEndTagin classCalendarTag- Returns:
- TagSupport.EVAL_PAGE always
- Throws:
jakarta.servlet.jsp.JspException- if an I/O error occurs
-