Open OAF page from Hyperlink in OAF

Scenario: Display hyperlink in page and open a page as a popup window when click on link

  1. Create a link item in main page
  2. Develop a new page that need to be displayed when we click on link
  3. Do the below code in Process Request method of respective controller java file
    1. Get the table bean
    2. Get the link item bean
    3. Prepare the page URL that need to be displayed when we click on link
    4. Prepare the JavaScript embed URL that need to assigned to hyperlink
    5. Assign the URL to link item

      public void processRequest(OAPageContext pageContext, OAWebBean webBean) {

         super.processRequest(pageContext, webBean);

         OAApplicationModule searchTrxAM = pageContext.getApplicationModule(webBean);         

         OATableBean searchTrxTable = (OATableBean)webBean.findChildRecursive("SearchResultsRN");

         OALinkBean orderNumberLink = (OALinkBean)searchTrxTable.findIndexedChildRecursive("OrderNumber");

         String customerPage = "/xx/oracle/apps/xx/CustomerTrxUI/webui/CustomerPG";

         String destinationURL = APPS_HTML_DIRECTORY + OAWebBeanConstants.APPLICATION_JSP + "?"+ OAWebBeanConstants.JRAD_PAGE_URL_CONSTANT+ "=" + customerPage;

         OABoundValueEmbedURL orderNumberJsWindow = new OABoundValueEmbedURL(orderNumberLink,"javascript:var win = window.open( '", destinationURL, "' , 'win', 'height=600,width=1000,left=80,top=250,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes'); win.focus();");

         orderNumberLink.setAttributeValue(oracle.cabo.ui.UIConstants.ON_CLICK_ATTR, orderNumberJsWindow);         

     }

*/

No comments:

Post a Comment