How to add popup window in OA Framework.
1) Create Image bean on your page or region.
Lets say you have created Image bean having id DetailsIMG
2) Create a page or region that you want to open as a popup.
3) Add following code in process request method of main page's controller.
/** Opening the popup
*/
OAImageBean img = (OAImageBean) webBean.findChildRecursive("DetailsIMG");
String url = "/xxtst/oracle/apps/per/selfservice/job/webui/XxTstPG";
// String Popupparams = "P_OrderNo={@OrderNo}&P_EmpCi={@EmpCi}";
// String page = url + "&retainAM=Y&fndOAJSPinEmbeddedMode=y" + "&" + Popupparams;
String page = url + "&retainAM=Y&fndOAJSPinEmbeddedMode=y";
String destURL = OAWebBeanConstants.APPS_HTML_DIRECTORY + OAWebBeanConstants.APPLICATION_JSP + "?" + OAWebBeanConstants.JRAD_PAGE_URL_CONSTANT + "=" + page;
OABoundValueEmbedURL jsBound = new OABoundValueEmbedURL(img, "openWindow(self, '", destURL, "' , 'longTipWin', {width:750, height:450}, true); return false;");
img.setAttributeValue(OAWebBeanConstants.ON_CLICK_ATTR, jsBound);
4) To close the popup add link bean or button on popup page or region and add below code on Destination URI property.
javascript:opener.submitForm('DefaultFormName',0,{XXX:' abc'});window.close();
Note: You can pass parameters also to main page.
This comment has been removed by the author.
ReplyDeletebut after opening the pop up page, the main page buttons are not working as earlier, workaround is need to refresh main page, Could you please help me how to fix this
ReplyDeleteThanks for sharing this blog. The content is beneficial and useful. Very informative post. Visit here to learn more about Data Warehousing companies and Data analytics Companies. I am impressed by the information that you have on this blog. Thanks once more for all the details. Visit here for Top Big Data Companies.
ReplyDelete