Next ADF Training
Join Demo Session
Toggle Bar
  • Home
    Home This is where you can find all the blog posts throughout the site.
  • Categories
    Categories Displays a list of categories from this blog.
  • Tags
    Tags Displays a list of tags that have been used in the blog.
  • Bloggers
    Bloggers Search for your favorite blogger from this site.
  • Team Blogs
    Team Blogs Find your favorite team blogs here.
  • Archives
    Archives Contains a list of blog posts that were created previously.
  • Login
    Login Login form

how to call an external url from Oracle Apps Function

Posted by on in OA Framework
  • Font size: Larger Smaller
  • Hits: 13431
  • 0 Comments
  • Subscribe to this entry
  • Print
  • Report this post

The below code snippet will help you to call an external application like ADF based or any other websites like google from oracle apps.You can register the function to call the external url.I had used this technique 3 years back to integrate an ADF application with oracle R12.

 1) Create A Dummy OAF Page with just a pagelayout


2) Create a controller and use the following code snippet in ProcessRequest.

public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);

String cholaNavURL = pageContext.getParameter("CholaNavUrl");

if ((cholaNavURL != null) || (!"".equals(cholaNavURL)))
{
//You can add any code here to get the AOL Object values and pass it to the called page as url
//Parameter.This will help you to do extra validation on your called page.
String s = "function cholanavexternal(){document.location='"+cholaNavURL+"';}";
OABodyBean bodyBean = (OABodyBean)pageContext.getRootWebBean();
pageContext.putJavaScriptFunction("cholanavexternal", s);
String javaS = "javascript:cholanavexternal();";
bodyBean.setOnLoad(javaS);

}
else {
throw new OAException("Incorrect Function Setup.Please Contact Your System Administrator",OAException.ERROR);
}
}


3) Register a function like below to test

External URL:

OA.jsp?page=/xxch/oracle/apps/fnd/cholabridge/webui/CholaBridgePG&CholaNavUrl=http://google.com


ADF Apps:

OA.jsp?page=/xxch/oracle/apps/fnd/cholabridge/webui/CholaBridgePG&CholaNavUrl=http://chola.orapps12.com:7777/JSFGraphDemo1/faces/PageWithDataAndGraph.jspx

The magic is quite simple here.Contact me if you have any queries.

 

 

0
  • No comments found

Login