Before discussing how to apply background colors for the schedule component cells, let's create two pages, named dynamicChangesClientsidecall.xhtml
and dynamicChangesServersidecall.xhtml
, for both client-side and server-side approaches, respectively.
Before applying a CSS rule to set the background color for an HTML element, we first have to create a CSS class with the background color property .You can either add a CSS rule in the head section of the same XHTML file or in a separate external style sheet file. In this case, we are going to add the CSS rule in the same file for simplicity.
Add the following CSS style classes to both of the pages for date and event selection in the head section using the Facelets technology, as follows:
<ui:define name="name"> <style type="text/css"> .scheduleDateBackground { background: yellow !important; } </style> <style type="text/css"> .scheduleEventBackground...