O'Reilly logo

Oracle ADF Faces Cookbook by Amr Gawish

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 JavaScript within an event response

Executing JavaScript within an event response can be very useful when you have a JavaScript library that does certain things on the client side, and you want to call these functions after finishing an action on the server side.

In this recipe, we will simply add a warning message to the Phone Number component if the user enters anything other than a number as the first letter and return the focus to the component again. You can refer to the last recipe to do this, or you also can grab this project's recipe by cloning the ADFFacesServerClientEvents application from the Git repository.

How to do it…

To learn how to execute a script within an event response, follow the ensuing steps:

  1. Open the events.jsf

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