In this chapter, we will explore how to use a combination of JavaScript and CSS to enhance an application. Themes can only do so much and, quite often, we want to enhance the way a PrimeFaces component looks depending on the state of the underlying data.
The following is a list of the topics that will be covered in this chapter:
Introducing the Schedule component
The problem with the currently selected date and event
Creating a CSS rule to set a background color in an HTML element
Creating a JavaScript function to apply that CSS rule to a specific HTML element
Executing a client-side JavaScript function from the server-side – the power of AJAX and the
RequestContext
utility