-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Oracle ADF Faces Cookbook
By :
In the previous recipe, we used clientListener and clientAttribute tags to call a function in JavaScript. We also had a bonus attribute accessible from the client side, but those attributes are not synchronized back to the server.
In this recipe, we will send custom data back to the server and send some payload with it. You can refer to the last recipe to do this, or you can grab this project's recipe by cloning the ADFFacesClientServerEvents application from the Git repository.
To learn how to send custom events from a client to a server, follow the ensuing steps:
Open the events.jsf page.
Drag the Email field under Chapter7DataControl | EmployeesView1 and drop it inside the panel form layout by navigating to Text | ADF Input Text w/ Label.
Right-click on the Email field from the Structure pane and select Client Listener by navigating to Insert Inside | ADF Faces.
Change the Method field to changeClientEmail.
Change the Type field to...
Change the font size
Change margin width
Change background colour