As per Dev Guide, There are two popup screen we can prepare in OAF, embedded and Parametrized, oracle has its tutorial on embedded popup, but little documentation on parametrized popups.
We will create a parameterized popup.
1. Create a package for popup as below
xxcom.oracle.apps.ibe.popup.server
=> create VOs
=> add VO to local AM
xxcom.oracle.apps.ibe.popup.webui
Identify the item which needs to be displayed as popup
ceate a stack layout on the item to be displayed as popup.
add one region, as popup, and another as link
Add caption |
above region is popup region
We need to create a popup region, which I prefer as Tablelayout, other only option is messagecomponnetlayout.
Now see How the popRN is defined
See How Parameter is Passed:
this is defined in parameter, while creating the popup region
param1={@ProductCode}¶m2={@InventoryItemId}
ProductCode and InventoryItemId are here the viewAttribute of the OrderLineVO, and can be called in below manner in PopUpCO, which is controller of additional regionn define here as popUpProductRN
Below is the code snippet of popUpProductRN controller
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
pageContext.writeDiagnostics(this, "popup > processRequest Starts****",6);
String param1 =(String)pageContext.getParameter("param1");
String param2 = (String)pageContext.getParameter("param2");
//Param1 is ProductCode Passed from View Attribute of the base page'
//param2 is inventoryitemid passed from viewObject's viewatribute of base page.
try
{
popUpProductInfoVOImpl prodInfoVO =
(popUpProductInfoVOImpl)am.findViewObject("popUpProductInfoVO1");
prodInfoVO.setWhereClause(null);
prodInfoVO.setWhereClause("CUST_ACCOUNT_ID=" + custAccId +
" and SHIP_FROM_ORG_ID=" + InvOrgId +
" and ORG_ID=" + pageContext.getOrgId() +
" and PRODUCT_CODE='" + product + "'");
prodInfoVO.executeQuery();
} catch (Exception e)
{
}
try
{
popUpProductSpecVOImpl prodSpecVO =
(popUpProductSpecVOImpl)am.findViewObject("popUpProductSpecVO1");
prodSpecVO.setWhereClause(null);
prodSpecVO.setWhereClause("CUST_ACCOUNT_ID=" + custAccId +
" and ORGANIZATION_ID=" + InvOrgId +
" and ORG_ID=" + pageContext.getOrgId() +
" and PRODUCT_CODE='" + product + "'");
prodSpecVO.executeQuery();
} catch (Exception e)
{
}
try
{
OAImageBean productImage =
(OAImageBean)webBean.findChildRecursive("productImage");
productImage.setSource("/OA_MEDIA/ITEMS_IMAGES/" + product + ".jpg");
} catch (Exception e)
{
}
}
}
Popup page open up as below: