« Expression Language: “#” or “$”? | Main | How Do I Initiate Region Navigation From the Parent Page? »

How Do I Include a Region Within an <af:popup>?

Regions can be incorporated into ADF Faces popup content to support tasks requiring complex navigation through a series of pages. Another important benefit of including regions within ADF Faces popups is content reuse. These great benefits make ADF Faces popups containing regions a commonly used application development pattern.

Incorporating regions into <af:popup> content can seem similar to incorporating regions into a page, especially since an <af:popup> is actually considered part of a page. However, there are some important differences to keep in mind. Many of these differences are the result of <af:popup> behavior being mainly client-side only. When a user discloses an <af:popup>, JavaScript on the client unhides the <af:popup> created previously when the page was initially displayed. When the <af:popup> is dismissed, JavaScipt on the client simply hides the <af:popup> again. By default in both cases, no event or request is sent to the server to refresh the region content or retrieve data based on the current application state. If the <af:popup> is displayed a second time, it simply redisplays the <af:popup> content remaining from the previous disclosure.

The default behavior limitations of <af:popup> content can be overcome quite easily though. To help describe the required development approach, I've created an Embeding Regions Inside PopUp Windows pattern document available on OTN. The pattern document also provides a link to download a sample application. Just follow the simple approach to ensure region content within an <af:popup> is newly refreshed for each launch of the <af:popup>. Soon you'll be seeing regions popping up all over!

blogpopupregion.gif

TrackBack

TrackBack URL for this entry:
http://blogs.oracle.com/mt/mt-tb.cgi/8524

Comments (2)

Clément:

Hi,
Very good and usefull work!
I've try to put the field "Ename" updatable (remove the readonly in the field Ename of employee-update-view.jsff).
The problem : when change an Ename value, and clic on the save button in the popup, the change doesn't appear in the table : How to refresh the table when clic on the save button?

Thanks

Clément

******************************************************************
Thanks for the feedback. You'll need to reQuery the iterator for the data to be reflected back into the table. This example used different Data Control RowCollections for the parent page table and the popup. You could also share the same Data Control RowCollection between the parent page and the popup. That would probably be the easiest way, if possible.

David Giammona

Hi David,

I have followed your recommendations and tried to create "update user in popup" pattern. It worked until I added input date with small date picker. My application ends up with this behaviour: http://www.screentoaster.com/watch/stVUhSRkRIR1xeSV9YX1NfUFFQ/date_picker_problem

As soon as I remove popup behaviour, my application works correctly (as taskflow in region that is just on main page).

So my question is if it is some bug or I might have messed something. Can you check it in your sample?

thanks,

Branislav

******************************************************************************************************
Hi, Branislav. Just tried adding a calendar picker to my sample application within the popup on HireDate. It worked and I did not receive the behavior you mention above. I was using the current production 11g JDeveloper release posted on OTN. Thanks, dg

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About This Entry

This page contains a single entry from the blog posted on November 17, 2008 4:10 PM.

The previous post in this blog was Expression Language: “#” or “$”?.

The next post in this blog is How Do I Initiate Region Navigation From the Parent Page?.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type and Oracle