JDeveloper Self Closing Popup

Based on Frank’s (Frank Nimphius) article How to auto-dismiss af:popup dialogs and the sample 105, a user on OTN JDev & ADF forum tried to get this running on JDeveloper Franks sample was built using JDeveloper and can’t be run without changes in JDeveloper
However, it’s easily possible to build a sample using showing how to use the af:poll to close a popup using an af:noteWindow or an af:dialog inside the popup. The technique is described in Frank’s article, so I spare repeating it here.
Let’s look at the running application

Running Sample

Running Sample

Clicking on the link “Show Popup NW” or the button “Popup NW” shows the location of the department in a note window

Location in Note Window

Location in Note Window

Clicking on the link “Show Popup DW” or the button “Popup DW” shows the location of the department in a dialog window (modal)

Location in Dialog

Location in Dialog

You can download the sample, which is using the HR DB schema, from ADF EMG Samples Project

UPDATE 2013-03-25:
as it turned out there is a problem with the af:poll component and the timeout setting. This timeout setting should cancel the poll component after the given period of time (which should work in This was one key feature in Frank’s original article. Using it turned out, that hte af:poll remains active even after the timeout period should have canceled any further events to the poll listener.
I implemented a fix for this behavior. The popup uses a fetch listener which sets the interval (5000 ms in the sample) and the poll listener cancel the poll by setting the interval to -1 after hiding the popup.
The code is written in a generic way to allow handling of different popups. Please download the new sample from ADF EMG Samples Project


One thought on “JDeveloper Self Closing Popup

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s