I am using primefaces(3.0) scheduler component.
http://www.primefaces.org/showcase-labs/ui/schedule.jsf
As we can see here there there are some events create
There's a constructor for DefaultScheduleEvent that takes a CSS class as parameter:
eventModel = new DefaultScheduleModel();
eventModel.addEvent(new DefaultScheduleEvent("Event for employee 1", new Date(), laterToday(), "emp1"));
eventModel.addEvent(new DefaultScheduleEvent("Event for employee 2", tomorrow(), laterTomorrow(), "emp2"));
emp1 and emp2 are the style classes.
For PrimeFaces 3.0 add the following css to your style sheet:
.emp1 .fc-event-skin {
background: red;
}
.emp2 .fc-event-skin {
background: green;
}
For other PrimeFaces versions, see the other answers