Blog Archives

How to create popup link in OAF dynamically or declaratively.

Step 1: Create an OAPopupBean. For example:

OAPopupBean popupBean =(OAPopupBean)createWebBean(pageContext,POPUP_BEAN,null,”myPopup”);
//Set the following properties on the pop-up:
popupBean.setID(“myPopup”);
popupBean.setUINodeName(“myPopup”);
String popupRegion= “/oracle/apps/fnd/framework/toolbox/labsolutions/webui/TestEmpDetailsRN” ;
popupBean.setRegion(popupRegion);
popupBean.setHeight(“130”);
popupBean.setWidth(“320”);
popupBean.setTitle(“Test”);
popupBean.setType(EMBEDDED_POPUP); /* Embedded type */

Step 2: Select the item (messageStyledText, image, link, or button) on which you want to enable the pop-up, and set the following properties, as shown in this example:

OATableBean tableBean = (OATableBean)webBean.findChildRecursive(“ResultsTable”);
OAImageBean image = (OAImageBean)webBean.findChildRecursive(“UpdateImage”);
image.setPopupEnabled(true);
image.setPopupRenderEvent(“onClick”);
image.setPopupID(“myPopup”);

Step 3: Add the pop-up as an indexed child of the region that contains the item on which the pop-up is enabled.

Note: If you are enabling a pop-up on an item within a classic table, advanced table or HGrid, then you must add the pop-up and the item on which it is enabled to a layout and add the layout as the indexed child of the table.

In this example, the pop-up is enabled on an image within a table, hence the pop-up is added as a second level indexed child of the table:

OAStackLayoutBean stackLayoutBean = new OAStackLayoutBean();
stackLayoutBean.addIndexedChild(popupBean);
tableBean.addIndexedChild(stackLayoutBean);

Source from https://forums.oracle.com/thread/2317119