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—openDialog and 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 ...

Get PrimeFaces Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.