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.
To learn how to execute a script within an event response, follow the ensuing steps: