O'Reilly logo

PrimeFaces Theme Development by Sudheer Jonna, Andy Bailey

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

Chapter 7. Dynamic Changes – a Working Example

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

Introducing the schedule component ...

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