Question

I know title is weird but here is my explanation:

I have a main page named as main.xhtml. In main.xhtml, another page is included named as dialog.xhtml.

main:

   <ui:include src="../pages/dialog.xhtml"/>

   <p:commandLink onclick="DialogWidget.show(); return false;"
                   title="dialog" />

Dialog.xhtml has a dialog and when i click the button in main page it opens the dialog.

When i inspect the network traffic in chrome, whatever I do in dialog.xhtml(like opening a panel with create button) posts the main.xhtml. This slows the system down. Is there any way to post dialog.xhtml in my operations in dialog.xhtm? I mean can i treat the dialog like a new page like main.xhtml?

Was it helpful?

Solution

You should try Dialog Framework from Primefaces. It loads the content from an xhtml page in a dialog from the backing bean. Here are 2 links from primefaces showcase that will help you get started:

Basic - https://www.primefaces.org/showcase/ui/df/basic.xhtml

Data - https://www.primefaces.org/showcase/ui/df/data.xhtml

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top