Requirement: I have a button with the name as “Launch Popup“. When I click on the “Launch Popup” button it opens a popup. Now, as per my requirement the popup should close automatically after 5 seconds of its launch.
Solution: For solution of the above requirement follow the steps as shown below:
Step 1: Create an Oracle ADF Fusion Web Application.
Step 2: Create a demo.jspx page inside the ViewController project.
Step 3: Drag and drop af:button inside the demo.jspx page. Set text=”Launch Popup”.
Step 4: Drag and drop af:popup just below the af:button. Set autoDismissalTimeout=”5″
Step 5: Drag and drop af:outputText inside the af:popup. Set value=”Auto dismiss popup after 5 seconds”
Step 6: Drag and drop af:showPopupBehavior inside the “Launch Popup” button. Set popupId=”p1″, align=”endAfter” and triggerType=”click”
Thus, the complete demo.jspx page is shown below:
Save all and run the application. Thus, the ran application is displayed below.
Click on the “Launch Popup” button and it will launch the popup with dialog as shown below.
If you notice, it will automatically close the popup after 5 seconds of its launch.
Hence, the solution to our requirement.
Thanks & Regards,
366 total views, 1 views today