Thursday, February 13, 2014

OADialogPage message in controller extension in oaf

The below code perform based on some condition and invokes warning message and user click OK button to proceed further

   if (oapagecontext.getParameter("paApply")!=null)
   {
String msg = " ";
MessageToken tkns[] = null;
msg = oapagecontext.getMessage("XX","XX_ADJ_MSG",tkns);
OAException message = new OAException(msg);
OADialogPage dialogPage = new OADialogPage(OAException.WARNING, message, null, "",null);
dialogPage.setOkButtonItemName("SaveYesButton");
dialogPage.setOkButtonToPost(true);
dialogPage.setOkButtonLabel("Ok");
oapagecontext.writeDiagnostics(this,"setPostToCallingPage: ",6);
dialogPage.setPostToCallingPage(true);
       oapagecontext.redirectToDialogPage(dialogPage);
    }

---Always add the handle as separate if condition
if (oapagecontext.getParameter("SaveYesButton")!=null)
{
System.out.println("Continue");
oapagecontext.writeDiagnostics(this,"Continue: ",6);
oapagecontext.writeDiagnostics(this,"paApply: "+oapagecontext.getParameter("paApply"),6);
oapagecontext.putParameter("paApply", new String("paApply"));
oapagecontext.writeDiagnostics(this,"paApply1: "+oapagecontext.getParameter("paApply"),6);
super.processFormRequest(oapagecontext, oawebbean);
}

2 comments:

Sridevi Koduru said...
This comment has been removed by the author.
Sridevi Koduru said...

I am Sridevi Koduru, Senior Oracle Apps Trainer With 8 Yrs Exp on Oracle Apps and 13 Yrs IT Exp Providing Online Training on Oracle Apps Technical, Oracle Apps Financial Functional, Oracle Apps SCM, Oracle Apps HRMS, Oracle Financial for Indian Localization, SQL, PL/SQL and D2K. I have Provided Training for 500+ Professionals Most of them are Working in Real Time now.

Contact for (One to One Personal Online Training) on Oracle Apps Technical, Oracle Apps Financial Functional, Oracle Financial for Indian Localization, Oracle Apps SCM, Oracle Apps HRMS, SQL, PL/SQL and D2K at training@oracleappstechnical.com or sridevikoduru@oracleappstechnical.com | +91-9581017828 | http://www.oracleappstechnical.com

Linkedin profile - http://in.linkedin.com/pub/sridevi-koduru/8b/76a/9b8/