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

Executing a client-side JavaScript function from the server-side – the power of AJAX and RequestContext

In the previous sections, we have created a CSS rule and a JS function to apply a background color to an HTML element. The JS function needs to be executed by a JS function call when either date selection or event selection AJAX events get fired. We need to pass the currently selected date as an argument for the date selection JS function and the start date and end date as arguments for the event selection JS function.

In this case (a plain JSF application approach), we will generally store the listener arguments in hidden input variables and update those values on the AJAX update. Then we will create JS functions to retrieve the date arguments ...

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