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 OAF page from JavaScript

Posted by on in OA Framework
  • Font size: Larger Smaller
  • Hits: 7561
  • 1 Comment
  • Subscribe to this entry
  • Print
  • Report this post

I had this requirement where I had to pass the url generated in OAF to Java script. In Javascript I have a link, when clicked needs to go back to OAF page. The problem I had was when I pass just "OA.jsp?OAFunc=<functionname> it was throwing me an error.

You are trying to access a page that is no longer active.
- The referring page may have come from a previous session. Please select Home to proceed.

 

Then I found out that a new parameter oas needs to be also passed.

Import the below statements:

import oracle.apps.fnd.framework.server.OADBTransactionImpl;
import oracle.apps.fnd.common.URLTools;
import oracle.apps.fnd.common.WebAppsContext;

Below code will help to generate the url with oas parameter:

String sourceUrl="OA.jsp?OAFunc=<function name>
      WebAppsContext wctx = (WebAppsContext)((OADBTransactionImpl) pageContext.getApplicationModule(webBean).getOADBTransaction()).getAppsContext();
      String secureUrl = URLTools.generateSecureURL (sourceUrl, wctx);

0
Trackback URL for this blog entry.

People in this conversation

Login