Time for action – creating the Schedule component
Let us see how to create a Schedule component and initialize some sample events.
- Create the
ScheduleModel
instance and add theScheduleEvent
objects. Also implement the event listener methods fordateSelect
,eventSelect
,eventMove
, andeventResize
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 DefaultScheduleEvent("Product XYZ Release Plan Meeting", buildDate(2013,10,16,8,0), buildDate(2013,10,16,9,0))); } private Date buildDate(int year, int month, int day, int...