JDeveloper 11.1.1.6.0: 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 11.1.1.6.0. Franks sample was built using JDeveloper 11.1.2.3.0 and can’t be run without changes in JDeveloper 11.1.1.6.0.
However, it’s easily possible to build a sample using 11.1.1.6.0 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 11.1.2.3). This was one key feature in Frank’s original article. Using 11.1.1.6.0 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

1 thought on “JDeveloper 11.1.1.6.0: Self Closing Popup

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.