OAF - Controller Code to create Javascript popup window


/ Published in: Java
Save to your folder(s)

Sample code from processFormRequest to pop up new window via javascript. worth noting: this is not recommended as it can break the OAF page.


Copy this code and paste it in your HTML
  1. String pubOrderId = pageContext.getParameter("orderId");
  2. StringBuffer l_buffer = new StringBuffer();
  3. StringBuffer l_buffer1 = new StringBuffer();
  4. l_buffer.append("javascript:mywin = openWindow(top, '");
  5. l_buffer1.append("/jct/oracle/apps/xxpwc/entry/webui/AddAttachmentPG");
  6. l_buffer1.append("&retainAM=Y");
  7. l_buffer1.append("&pubOrderId="+pubOrderId);
  8. String url = "/OA_HTML/OA.jsp?page="+l_buffer1.toString();
  9. OAUrl popupUrl = new OAUrl(url, OAWebBeanConstants.ADD_BREAD_CRUMB_SAVE );
  10. String strUrl = popupUrl.createURL(pageContext);
  11. l_buffer.append(strUrl.toString());
  12. l_buffer.append("', 'lovWindow', {width:750, height:550},false,'dialog',null);");
  13. pageContext.putJavaScriptFunction("SomeName",l_buffer.toString());

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.