ADF Code Corner: How to auto-dismiss af:popup dialogs - Oracle
Recommend Documents
Dec 1, 2010 - http://www.oracle.com/technetwork/developer-tools/adf/learnmore/ ... http://www.mhprofessional.com/product
Jan 26, 2012 - value options for the outcome element are printable and email. As the value of the outcome ... return "&l
Mar 18, 2013 - Oracle ADF Code Corner is a loose blog-style series of how-to .... http://www.oracle.com/technetwork/deve
Mar 4, 2013 - HTML and JavaScript, which means that what you see on your mobile ... when property changes check box (sho
Jan 12, 2012 - Oracle ADF Code Corner is a loose blog-style series of how-to documents that provide solutions to real wo
Aug 22, 2012 - In a previous article, "How-to drag-and-drop data from an af:table to ... drag and drop to other layout c
Feb 8, 2011 ... like Java Applets and jQuery. This article explains how to establish bi-directional
communication between a Java. Applet and an ADF Faces ...
Sep 30, 2012 - ADFcg - Stands for âApplication Development Framework Code ..... not access application modules as this
Jun 30, 2011 - How-to change the WS connection for a WS DC. Using the Web Service Data Control (WS DC) to access a remot
22 Jul 2008 ... How-to pass additional arguments to a. JavaScript function using the af:
clientAttribute element. Abstract: In JDeveloper 11, JavaScript events ...
Oct 30, 2010 - and adoption of the Oracle Application Development. Framework .... 17. Why? ADF BC bound table references
Mar 30, 2012 - command button then no JavaScript would be needed at all and JavaScript rule #1 would apply. On the serve
Jun 30, 2011 - The Oracle JDeveloper forum is in the Top 5 of the most ..... Page 10 ..... JDeveloper 11g and for web designers that are tasked with building a ...
Feb 29, 2012 - and adoption of the Oracle Application Development. Framework .... ADF skinning applies style sheet defin
Oct 30, 2010 - How-to add ADF binding based auto suggest behavior . ..... Option 1 â Delete the table row from Java an
Apr 30, 2012 - and adoption of the Oracle Application Development. Framework ... Which option to choose for accessing We
Aug 30, 2011 - individuals in the community, their company background, ..... known as search engine optimization (SEO),
correction to the McGraw Hill "Oracle Developer Guide" by Frank Nimphius and Lynn .... http://www.mhprofessional.com/pro
Apr 30, 2012 - The user data map can be accessed from Java for read and write by ..... You can now drag the method from
Mar 30, 2012 - limitation in that they cannot be embedded as a region on a page but require the ... If the related Optim
Aug 30, 2011 - New OTN Harvest Feature: OTN Harvest Spotlight. The ADF community is growing at an exponential rate. New
May 30, 2012 - in the WLS integrated LDAP server. ... http://www.oracle.com/technetwork/developer-tools/jdev/ ... simpli
Feb 29, 2012 - and adoption of the Oracle Application Development. Framework .... ADF skinning applies style sheet defin
Aug 30, 2011 - No support can be given through Oracle customer support. Please post questions or report problems related
ADF Code Corner: How to auto-dismiss af:popup dialogs - Oracle
Dec 4, 2012 - Abstract: The two use cases for the af:popup are to show content for edit or for ... upon opening (Content
ADF Code Corner 105. How to auto-dismiss af:popup dialogs Abstract: The two use cases for the af:popup are to show content for edit or for information. In the latter case you may want to implement a functionality that auto-hides a popup after a certain period of time. Users should have the option to close the popup by pressing a close icon, a close button, or by a click outside of the popup. This article shows you how to implement auto popup dismissal using ADF Faces declarative on-board functionality.
twitter.com/adfcodecorner Author:
Frank Nimphius, Oracle Corporation twitter.com/fnimphiu 04-DEC-2012
ADF CODE CORNER How to auto-dismiss af:popup dialogs
Oracle ADF Code Corner is a loose blog-style series of how-to documents that provide solutions to real world coding problems. Disclaimer: All samples are provided as is with no guarantee for future upgrades or error correction. No support can be given through Oracle customer support. Please post questions or report problems related to the samples in this series on the OTN forum for Oracle JDeveloper: http://forums.oracle.com/forums/forum.jspa?forumID=83
Introduction In the sample you can download for this article, a note window (contained in an af:popup) is opened by a click on the "Show More" link provided for each table row.
The note window shows additional information for the selected table row. If the user does not click outside of the notw window, the window closes within 5 seconds enforced by a one-time poll.
2
ADF CODE CORNER How to auto-dismiss af:popup dialogs
Implementation As mentioned earlier, the implementation is declarative and does not require client side JavaScript. . The af:popup component that hosts the af:noteWindow component is configured to refresh its content upon opening (ContentDelivery > lazyUncached). Unless the information in a dialog doesn't change, the lazyUncached value is what you always should use. The child creation of the popup is set to "deferred" for better dialog opening performance. Using this setting, the content is fetched in subsequent partial requests.
Set the AutoCancel property to enabled allows the user to close the note window by clicking anywhere outside of the dialog. Note: if you use af:dialog instead of af:noteWindow you can also use the dialog listeners or the OK and CANCEL buttons to allow users to actively close the dialog. Also note the ResetEditableValues property which is set to whenCancelled. If the popup content wasn't read only then setting the ResetEditableValues property ensures data to be released when the dialog closes so that next time you open the dialog, it displayed the records of the newly selected row. The af:poll component, shown in the image below, is added to the af:popup component, which implicitly means that the poll is not started before the popup opens (one of the benefits you get from deferred child loading). The important property settings of the af:poll dialog are Interval, which you use to determine how long the dialog should stay open, Timeout, which you set slightly larger than Interval to ensure a onetime poll and PollListener, which references a managed bean that closes the popup using a component binding created from the af:popup "Bindings" property to this managed bean (request scope or backing bean scope for that reason).
3
ADF CODE CORNER How to auto-dismiss af:popup dialogs
The managed bean code of interest is shown below public void closeOnPoll(PollEvent pollEvent) { handleClose(); } //close dialog in private method so you can reuse logic //if content e.g. is shown in dialog so popup can be closed //by buttons private void handleClose() { employeePopup.hide(); }
Download The sample to this article can be downloaded as sample 105 from the ADF Code Corner Website http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index101235.html#CodeCornerSamples The sample comes as a JDeveloper 11.1.2.3 workspace for which you need to configure the database connection to point to the HR schema of a local database of yours
RELATED DOCOMENTATION
4
ADF CODE CORNER How to auto-dismiss af:popup dialogs