514 total views, 3 views today

Using ADF popup & show af:popup programmatically

ADF popup is an invisible component in the ADF page, used in conjunction with other components to display Dialogs, PanelWindows, menus, and not windows. In this section, I described an example of creating a popup with dialog box displays a message when a button clicked.

IDE Used:

JDeveloper 12C

ADF popup example :

1. Drag and Drop a af:popup to the jsf page

062616_0335_CreateaPopu1 Using ADF popup & show af:popup programmatically

2. Drop a button on the page below the popup

062616_0335_CreateaPopu2 Using ADF popup & show af:popup programmatically

3. Drop a showpopup inside the button and put the id as p1. This should be the id of popup component

062616_0335_CreateaPopu3 Using ADF popup & show af:popup programmatically

4. Drop a dialog box inside the popup

062616_0335_CreateaPopu4 Using ADF popup & show af:popup programmatically

5. Drop a output text inside the dialog, change the value to ‘A popup

062616_0335_CreateaPopu5 Using ADF popup & show af:popup programmatically

6. The final code is as below

Open the af:popup programmatically:

In case, if you want to open the popup from the button action method , then the below two line do the job for you. Here getP1() is the popup object

Run the Page in Browser

If you run the page in browser, you get the following screen. On clicking the button, you will get the popup as like below

062616_0335_CreateaPopu6 Using ADF popup & show af:popup programmatically

govindan Using ADF popup & show af:popup programmatically
Connect me

Govind

Thank you for visiting my personal blog. Myself Govindan, Software Developer by profession since 2006 and hence I started this blog early in 2016 and ever since I've been writing about technologies experienced and learnings of everyday life.

The views expressed on this blog are my personal views and do not necessarily reflect the views of my employer.

Please feeling free to reach me on any comments and feedbacks you have. Would be more than glad to listen and reply šŸ™‚
govindan Using ADF popup & show af:popup programmatically
Connect me
  • Arjun Vijayvargiya

    How to remove ok and cancel button

  • Devs

    a big thanks to you. it solved my popup issue, which i was trying to solve for almost an hour

Like us on Facebook.
Connect!