Opening external pages in dynamically generated dialogs
The regular usage of PrimeFaces' dialog is a declarative approach with
p:dialog. Besides this declarative approach, there is a programmatic approach as well. The programmatic approach is based on a programmatic API where dialogs are created and destroyed at runtime. It is called Dialog Framework. Dialog Framework is used to open external pages in dynamically generated dialogs. The usage is quite simple;
RequestContext provides two methods—
closeDialog—that allow the opening and closing of dynamic dialogs. Furthermore, Dialog Framework makes it possible to pass data back from the page displayed in the dialog to the caller page.
In this recipe, we will demonstrate all features ...