O'Reilly logo

PrimeFaces Beginner's Guide by K. Siva Prasad Reddy

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

Time for action – creating the Schedule component

Let us see how to create a Schedule component and initialize some sample events.

  1. Create the ScheduleModel instance and add the ScheduleEvent objects. Also implement the event listener methods for dateSelect, eventSelect, eventMove, and eventResize events.
    @ManagedBean @ViewScoped public class ScheduleController implements Serializable { private ScheduleModel eventModel; public ScheduleController() { eventModel = new DefaultScheduleModel(); eventModel.addEvent(new DefaultScheduleEvent("John BirthDay", buildDate(2013,10,15,9,10), buildDate(2013,10,15,9,40))); eventModel.addEvent(new DefaultScheduleEvent("Meeting with ABC Corp", buildDate(2013,10,15,12,0),buildDate(2013,10,15,13,0))); eventModel.addEvent(new ...

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