Code: Select all
<p:dialog header="Modal Dialog" modal="true" widgetVar="popup">
<ui:include src="popup.xhtml"/>
<p:ajax event="close" listener="#{mainBean.listenForResultFromPopup}" update="..."/>
</p:dialog>
But popup.xhtml is actually a search view, I need the clicking of a button inside it to update properties in its managed bean: popup.java. If I want to fire the "Close" event, it has to be in another different JSF life cycle, because "Close" acts like a "cancel" button and extends AjaxBehaviorEvent, right? That's why I am looking for ways to fire "Close" event in my modal dialog without user input (clicking "X").
Thanks in advance.