af:popup is a container component for noteWindow, dialog, panelWinow, context menus etc. When we use a popup with af:noteWindow, there is property autoDismissalTimeout is responsible for closing popup after some specific time.
But if we are using af:dialog in af:popup , how to auto dismiss popup component in this situation?
Steps to do-
- Create a fragment in taskFlow and drag a button on which we have to open the popup.
- Drag a popup in page and showPopupBehavior inside button, pass the id of popup and set trigger type to action to open poup on button click
- Now drag a af:poll component inside af:dialog
poll component delivers the poll event to the server at fixed intervals, so we can use this property to fulfil our requirement .
- Select the poll component in structure window and go to propertyInspector, create a poll listener in the managed bean and set Interval and Timeout to 4000 & 4001 (Timeout slightly greater than Interval time)-It means poll event delivers to the 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.
An Oracle ACE, Blogger, Reviewer, Technical Lead working on Oracle ADF