Book Image

Oracle ADF Faces Cookbook

By : Amr Ismail Gawish
Book Image

Oracle ADF Faces Cookbook

By: Amr Ismail Gawish

Overview of this book

Table of Contents (18 chapters)
Oracle ADF Faces Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Using polling events to update pages


ADF Faces provides the poll component that have both server and client side events, namely, pollEvent, which can be used to communicate with the server at specified intervals. This can be useful to provide updates to certain components at a fixed interval, and by decreasing this interval, you are getting close to providing live updates.

In this recipe, we will refresh the employees table every 5 seconds to see the changes in the table, and we will mimic this change by editing values in the database directly and see how it gets reflected on the page. You can refer to the last recipe, or you can grab this project's recipe by cloning ADFFacesPolling application from the Git repository.

How to do it…

To learn how to use the poll component, follow the ensuing steps:

  1. Open the adfc-config.xml file.

  2. Drag a view from the Components palette and drop it inside the Diagram mode.

  3. Name the view pollEmployees.

  4. Double-click on the newly created view to create the page and choose...