Showing posts with label Popup display on page load. Show all posts
Showing posts with label Popup display on page load. Show all posts

Thursday, 29 October 2015

Displaying a Popup on Page Load


This blog we will see how to display a popup on page load.
The below steps we need to follow to display a popup on page load.
1. Create a page which one you want to display on Page.
2. Create a popup which one you want to display after the page load.


<af:popup childCreation="deferred" autoCancel="disabled" id="p1">
      <af:dialog title="Displaying the Popup on Page Load" id="d2">
            <f:facet name="buttonBar"/>
            <af:panelFormLayout id="pfl1">
            <af:outputText value="This is the onload popup." id="ot2"/>
            </af:panelFormLayout>
      </af:dialog>
</af:popup>

3. Add the af:showPopupBehaviorafter the af:form like the below
4. Now set the trigger type to load in af:showPopupBehavior.
 Now run your page and the popup will comes up after page load like the below.
You Can download the code: Download

Thanks..