Leveraging Schedule's lazy loading feature

The Schedule component provides a calendar to manage events, such as Outlook Calendar or iCal . By default, a whole set of events is eagerly provided via ScheduleModel. That means all events are loaded at once on page load. Lazy loading feature helps to improve performance if we have a huge dataset of events or events take much time to load. In the lazy loading mode, only events that belong to the displayed time frame are fetched.

In this recipe, we will implement a small example for the Schedule component's lazy loading feature.

How to do it...

By default, the view month is displayed, so the user sees a whole month and can switch between months. Assume we have to load events for 12 months and every ...

Get PrimeFaces Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.