af:popup is container component for noteWindow, dialog, panelWinow, contextMenus, when we use popup with af:noteWindow, there is property autoDismissalTimeout is responsible for closing poup after some specific time.
But if we are using af:dialog in af:popup , how to close popup in this situation ?
Steps to do-
Sample ADF Application- Download
But if we are using af:dialog in af:popup , how to close popup in this situation ?
Steps to do-
- Create a fragment in bounded taskFlow and drag a button on which we have to open popup.
- Drag a popup in page and showPopupBehavior inside button, pass id of popup and set trigger type to action to open poup on button click
- Now drag a af:poll component inside af:dialog
- Select poll component in structure window and go to propertyInspector ,create poll listener in managed bean and set Interval and Timeout to 4000 & 4001 (Timeout slightly greater than Interval time)-It means poll event delivers to server after 4000 ms or 4second
- Now bind popup component to your managed bean, inorder to control poup properties
- Close poup in pollListener(), means when after 4sec when poll event invoke server, it will close popup dialog automatically.
Sample ADF Application- Download