Using an af:popup during long running tasks
For long-running tasks in your application, a pop-up message window can be raised to alert the users that the specific task may take a while. This can be accomplished using a combination of ADF Faces components (af:popup and af:dialog)
and some JavaScript code.
In this recipe, we will initiate a long-running task in a managed bean, and raise a pop-up for the duration of the task to alert us to the fact that this operation may take awhile. We will hide the pop-up once the task completes.
Getting ready
You will need to create a skeleton Fusion Web Application (ADF) workspace before you proceed with this recipe. For this, we will use the MainApplication
workspace that was developed in Breaking up the application in multiple workspaces, Chapter 1,Pre-requisites to Success: ADF Project Setup and Foundations.
How to do it…
1. Open the
MainApplication
workspace and create a new JSPX page calledlongRunningTask.jspx
based on any of the quick start layouts...