21 November, 2017

OAF : Programmatically Add a Parameterized Pop-up

To programmatically add a parameterized pop-up to a component , add the following code in processRequest method

Step 1: Create an OAPopupBean 

 OAPopupBean popupBean1=(OAPopupBean)createWebBean(pageContext,POPUP_BEAN,null,"myPopup1");
popupBean1.setID("myPopup1");
popupBean1.setUINodeName("myPopup1");
popupBean1.setRegion("/oracle/apps/per/xyz/webui/PopupRN");
popupBean1.setHeight("130");
popupBean1.setWidth("320");
popupBean1.setTitle("Popup Title");
popupBean1.setParameters("personId={@PersonId}");
popupBean1.setType(PARAMETERIZED_POPUP);


Step 1: Add popup to item which you want to enable the pop-up, for example "EmpDtlBtn" button

OAButtonBean empDtlBtnBean = (OAButtonBean)webBean.findChildRecursive("EmpDtlBtn");
empDtlBtnBean.setPopupEnabled(true);
empDtlBtnBean.setPopupRenderEvent("onClick");
empDtlBtnBean.setPopupID("myPopup1");

webBean.addIndexedChild(popupBean1);


Thanks

OAF :Formatting DateTime Fields

Use the following code to format DateTime feilds in OAF OAWebBean departureDateBean = webBean.findChildRecursive("DepartureDate"...