Browser Navigation issue in OAF

Usually this issue occurs when closing the popup window and moving to the next set of data of search results using table navigation bar.

Lets look at the snaps of the issue for reference.








Code which has issue:

String errorPage = "/ah/oracle/apps/aoc/AHOMUI/webui/AHOMErrorsPG&banner=home&addBreadCrumb=Y&ErrorId={@ErrId}";

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

OALinkBean errorsAdvLink = (OALinkBean)advResultsTabBean.findIndexedChildRecursive("ErrorAdv");

OABoundValueEmbedURL errorAdvJsWindow = new OABoundValueEmbedURL(errorsAdvLink, 

                                                                         "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();");

errorsAdvLink.setAttributeValue(oracle.cabo.ui.UIConstants.ON_CLICK_ATTR, errorAdvJsWindow);



To resolve this issue, we need to retain the application module in the popup page.


Solved code:


String errorPage = "/ah/oracle/apps/aoc/AHOMUI/webui/AHOMErrorsPG&banner=home&retainAM=Y&addBreadCrumb=Y&ErrorId={@ErrId}";

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

OALinkBean errorsAdvLink = (OALinkBean)advResultsTabBean.findIndexedChildRecursive("ErrorAdv");

OABoundValueEmbedURL errorAdvJsWindow = new OABoundValueEmbedURL(errorsAdvLink, 

                                                                         "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();");

errorsAdvLink.setAttributeValue(oracle.cabo.ui.UIConstants.ON_CLICK_ATTR, errorAdvJsWindow);

Read More »
Blogger Tricks
*/

Assign SQL value to variable in shell script


Requirement is to get the emails list from value set and send an email using shell script.


Sample Shell Script:

#!/bin/ksh

#*******************************************************************************

# Name : HH_TEST_SHELL

# Date : 19-MAY-2023

# By : AskHareesh

# Description : Execute JAR File

#*******************************************************************************

MAILBODY="Hi Team,

Please find the attached report."

MAIL_SUBJECT="Sales Order Status Report"

LOGDIR="/test/dir/"

LOGFILE="SalesOrderReport.csv"

INSTANCENAME="DEV"


VALIDATEEMAILS=`sqlplus -s $FCP_LOGIN <<-BBB

set pages 0

set feedback 0

select LISTAGG(ffv.FLEX_VALUE, ',')

from  apps.FND_FLEX_VALUE_SETS ffvs, apps.fnd_flex_values ffv

where 1=1

and ffvs.flex_value_set_id = ffv.flex_value_set_id 

and ffvs.flex_value_set_name='ASK_HAREESH_TEST'

and NVL(ffv.enabled_flag,'N')='Y'

and TRUNC(sysdate) between TRUNC(NVL(ffv.start_date_active,SYSDATE)) AND TRUNC(NVL(ffv.end_date_active,SYSDATE))

/

  EXIT

BBB

`

(echo  "$MAILBODY") | mailx -s "$INSTANCENAME : $MAIL_SUBJECT" $VALIDATEEMAILS

Read More »
*/

Send an email with out attachment from shell script


Requirement is to send an email with out attachment using shell script.

Sample Shell Script:

#!/bin/ksh

#*******************************************************************************

# Name : HH_TEST_SHELL

# Date : 19-MAY-2023

# By : AskHareesh

# Description : Execute JAR File

#*******************************************************************************

MAILBODY="Hi Team,

Please find the attached report."

MAIL_SUBJECT="Sales Order Status Report"

VALIDATEEMAILS="askhareesh@gmail.com"

LOGDIR="/test/dir/"

LOGFILE="SalesOrderReport.csv"

INSTANCENAME="DEV"

(echo  "$MAILBODY") | mailx -s "$INSTANCENAME : $MAIL_SUBJECT" $VALIDATEEMAILS

Read More »
*/

Send an email from shell script with attachment


Requirement is to send an email with file as an attachment using shell script.

Sample Shell Script:

#!/bin/ksh

#*******************************************************************************

# Name : HH_TEST_SHELL

# Date : 19-MAY-2023

# By : AskHareesh

# Description : Execute JAR File

#*******************************************************************************

MAILBODY="Hi Team,

Please find the attached report."

MAIL_SUBJECT="Sales Order Status Report"

VALIDATEEMAILS="askhareesh@gmail.com"

LOGDIR="/test/dir/"

LOGFILE="SalesOrderReport.csv"

(echo  "$MAILBODY" ; uuencode $LOGDIR/$LOGFILE $LOGFILE) | mailx -s "$INSTANCENAME : $MAIL_SUBJECT" $VALIDATEEMAILS

Read More »
*/

Refresh parent window after closing popup window - OAF


Requirement is to refresh the parent window page to reflect the changes after closing the popup window page.

1. Put a javascript function on popup window page's body bean in process request to send the refresh event back to parent window page.

OABodyBean bodyBean = (OABodyBean)pageContext.getRootWebBean();

pageContext.putJavaScriptFunction("refreshParent", "function refreshParent() { opener.submitForm('DefaultFormName',1,{'actionEvent':'REFRESH_PARENT'}); window.close(); }");

OAButtonBean bean = (OAButtonBean)webBean.findChildRecursive("closeBtn");

if (bean != null) {

  bean.setOnClick("javascript:refreshParent()");

}


2. Consume the refresh event in the main/parent window page process form request and remove the event parameter

if("REFRESH_PARENT".equals(pageContext.getRenderingContext().getServletRequest().getParameter("actionEvent"))) 

   {

      pageContext.removeParameter("actionEvent");

      doSearch(pageContext, webBean); // This is a method to get the input parameters and execute view object along with where conditions

   }

Read More »
*/

Kill JAR execution in Oracle Apps server


Sometimes, we will be having a requirement to kill the JAR processes that are in execution status.

Below command is to get the process id of the running JSR execution process and kill it.

kill $( ps -ef | grep $JAR_FILE | grep -v -e "grep" | awk '{print $2}')

Read More »
*/

Verify if any JAR file is running in server


The requirement is to verify if any specific JAR file is running in the server.

So in this case, we use below grep command to know which JARs are in execution status.

 ps -ef | grep $JAR_FILE | grep -v -e "grep"

Read More »
*/