O'Reilly logo

PrimeFaces Cookbook by Mert Çalışkan, Oleg Varaksin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required