You are on page 1of 1

super.

processRequest(pageContext, webBean); {
if (!pageContext.isFormSubmission())
{
OAApplicationModule am = pageContext.getApplicationModule(web
Bean);
am.invokeMethod("InsertRecord", null);
}
}
}
/**
* Procedure to handle form submissions for form elements in
* a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
*/
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processFormRequest(pageContext, webBean);
OAApplicationModule am = pageContext.getApplicationModule(webBean);
if (pageContext.getParameter("Save") != null)
{
OAViewObject vo=(OAViewObject)am.findViewObject("EmployeeVO1");
String employeeName = (String)vo.getCurrentRow().getAttribute("EmployeeNa
me");
Number employeeNumber = (Number)vo.getCurrentRow().getAttribute("Employee
Id");
String employeeNum = String.valueOf(employeeNumber.intValue());
am.invokeMethod("Save");
MessageToken[] tokens = { new MessageToken("EMP_NAME", employeeName),
new MessageToken("EMP_NUMBER", employeeNum) };
OAException confirmMessage = new OAException("AK", "FWK_TBX_T_EMP_CREAT
E_CONFIRM",
tokens,
OAException.CONFIRMATION, null);
pageContext.putDialogMessage(confirmMessage);
pageContext.forwardImmediately("OA.jsp?page=/oracle/apps/ak/HospitalMa
nage/webui/EmployeeInsertPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true, // retain AM
OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
}
}

You might also like