org.wicketstuff.calendarviews.model
Interface IEventProvider
- All Superinterfaces:
- IClusterable, IDetachable, IModel<Collection<? extends IEvent>>, Serializable
public interface IEventProvider
- extends IModel<Collection<? extends IEvent>>
The main data-locator interface between your service or data access layer and CalendarViews. Note
that it is at its heart a standard Wicket IModel<Collection<? extends IEvent>>. It
only adds a single method so that the CalendarViews layer can initialize it to the proper date
range needed.
NOTE: Read the documentation on the initializeWithDateRange method carefully. It
is important to understand the difference between the dates that you initialize your calendar
with and the dates that the calendar will initialize your IEventProvider with.
- Author:
- Jeremy Thomerson
- See Also:
initializeWithDateRange(Date, Date)
|
Method Summary |
void |
initializeWithDateRange(Date start,
Date end)
Called by the calendar view when it has computed what the actual start and end dates of the
range that it will be displaying are. |
initializeWithDateRange
void initializeWithDateRange(Date start,
Date end)
- Called by the calendar view when it has computed what the actual start and end dates of the
range that it will be displaying are. This is necessary, for example, because you may
initialize the calendar view with a range of Wednesday through a Thursday, but depending on
the type of view that it is, it may show from the Sunday prior to your start to the Saturday
after your end.
Note that the end time is exclusive. Therefore, if the calendar is displaying Sunday through
Saturday, the start date will be Sunday at 00:00:00.000 and the end date will be the
following Sunday at 00:00:00.000
Also notable is that you need to remember to include not only events that begin within this
range, but also events that begin before, but end within this range. i.e. your query may be
like:
where (start > :start and start < :end)
or (end < :end and end > :start)
- Parameters:
start - The first instant that the calendar will display, inclusiveend - The last instant that the calendar will display, exclusive
Copyright © 2011. All Rights Reserved.