Displaying Calendar Items"
From Documentation
Line 4: | Line 4: | ||
In the component perspective, Calendars is designed in MVC pattern: | In the component perspective, Calendars is designed in MVC pattern: | ||
− | * <tt>Calendars</tt> (Controller): receive UI events | + | * <tt>Calendars</tt> (Controller): receive UI events, calling event listeners |
* <tt>CalendarModel</tt> (Model): stores <tt>CalendarItem</tt> | * <tt>CalendarModel</tt> (Model): stores <tt>CalendarItem</tt> | ||
* <tt>ContentRenderer</tt> (View): renders a calender-related data to the client-side upon <tt>CalendarModel</tt> | * <tt>ContentRenderer</tt> (View): renders a calender-related data to the client-side upon <tt>CalendarModel</tt> | ||
+ | |||
+ | Base on this architecture, if you want to show some items on a Calendar, you need to create some <tt>CalendarItem</tt> in a <tt>CalendarModel</tt> and assign it to <tt>Calendars</tt>. | ||
= Create a CalendarModel = | = Create a CalendarModel = |
Revision as of 06:30, 20 January 2021
Component in MVC Pattern
In the component perspective, Calendars is designed in MVC pattern:
- Calendars (Controller): receive UI events, calling event listeners
- CalendarModel (Model): stores CalendarItem
- ContentRenderer (View): renders a calender-related data to the client-side upon CalendarModel
Base on this architecture, if you want to show some items on a Calendar, you need to create some CalendarItem in a CalendarModel and assign it to Calendars.
Create a CalendarModel
Assign the Model to Calendars
The example project is at Github