Scenario: Display hyperlink in page and open a page as a popup window when click on link
- Create a link item in main page
- Develop a new page that need to be displayed when we click on link
- Do the below code in Process Request method of respective controller java file
- Get the table bean
- Get the link item bean
- Prepare the page URL that need to be displayed when we click on link
- Prepare the JavaScript embed URL that need to assigned to hyperlink
- 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