Tuesday, 12 June 2012

How to get HashMap and request Parameter in the Next Page using pagecontext.getparameter method


public class HumanResourceController extends OAControllerImpl
{
  public static final String RCS_ID="$Header$";
  public static final boolean RCS_ID_RECORDED =
        VersionInfo.recordClassVersion(RCS_ID, "%packagename%");

  /**
   * Layout and page setup logic for a region.
   * @param pageContext the current OA page context
   * @param webBean the web bean corresponding to the region
   */
  public void processRequest(OAPageContext pageContext, OAWebBean webBean)
  {
    super.processRequest(pageContext, webBean);
  System.out.println("I am Human Resource Page processRequest of HR page"); 
String eno=pageContext.getParameter("EmployeeNo");
String ena=pageContext.getParameter("EmployeeName");
String endgn=pageContext.getParameter("EmployeeDesignation");
String endv=pageContext.getParameter("EmployeeDivision");
String endp=pageContext.getParameter("EmployeeDepartment");
String encty=pageContext.getParameter("EmployeeCity");
//--------
String  empno =pageContext.getParameter("EmpNo");
String emppn=pageContext.getParameter("EmpPositionName");
String emplev=pageContext.getParameter("EmpLevel");
String  empgr =pageContext.getParameter("EmpGrade");
String empres=pageContext.getParameter("EmpResources");
String empdiv=pageContext.getParameter("EmpDivision");
String  empdeptt =pageContext.getParameter("EmpDepartment");
String empsubdeptt=pageContext.getParameter("EmpSubDepartment");
String empfun=pageContext.getParameter("EmpFunction");
String  empcty =pageContext.getParameter("EmpCity");
String emprpt=pageContext.getParameter("EmpReportTo");
String empst=pageContext.getParameter("EmpStatus");
String empct=pageContext.getParameter("EmpCaseType");
//---


String  emprno =pageContext.getParameter("EmpRno");
String emprname=pageContext.getParameter("EmpRname");
String emprdesignation=pageContext.getParameter("EmpRdesignation");
String  emprdepartment =pageContext.getParameter("EmpRdepartment");
String emprgrade=pageContext.getParameter("EmpRgrade");
String emprcity=pageContext.getParameter("EmpRcity");
String emprdol=pageContext.getParameter("EmpRdol");

//-




OAMessageTextInputBean  tibno = (OAMessageTextInputBean)webBean.findIndexedChildRecursive("empno");
tibno.setValue(pageContext,eno);

OAMessageTextInputBean  tibname= (OAMessageTextInputBean)webBean.findIndexedChildRecursive("empname");
tibname.setValue(pageContext,ena);

OAMessageTextInputBean  tibdesignation = (OAMessageTextInputBean)webBean.findIndexedChildRecursive("empdesignation");
tibdesignation.setValue(pageContext,endgn);

OAMessageTextInputBean  tibdepartment = (OAMessageTextInputBean)webBean.findIndexedChildRecursive("empdepartment");
tibdepartment.setValue(pageContext,endv);

OAMessageTextInputBean  tibdivision= (OAMessageTextInputBean)webBean.findIndexedChildRecursive("empdivision");
tibdivision.setValue(pageContext,endp);

OAMessageTextInputBean  tibcity = (OAMessageTextInputBean)webBean.findIndexedChildRecursive("empcity");
tibcity.setValue(pageContext,encty);

//------------------------------------------------------------



OAMessageTextInputBean  tibnewno = (OAMessageTextInputBean)webBean.findIndexedChildRecursive("newrno");
tibnewno.setValue(pageContext,empno);

OAMessageTextInputBean  tibpname= (OAMessageTextInputBean)webBean.findIndexedChildRecursive("pname");
tibpname.setValue(pageContext,emppn);

OAMessageTextInputBean  tibelevel = (OAMessageTextInputBean)webBean.findIndexedChildRecursive("elevel");
tibelevel.setValue(pageContext,emplev);

OAMessageTextInputBean  tibegrade = (OAMessageTextInputBean)webBean.findIndexedChildRecursive("egrade");
tibegrade.setValue(pageContext,empgr);

OAMessageTextInputBean  tiberequired= (OAMessageTextInputBean)webBean.findIndexedChildRecursive("erequired");
tiberequired.setValue(pageContext,empres);

OAMessageTextInputBean  tibedivision = (OAMessageTextInputBean)webBean.findIndexedChildRecursive("edivision");
tibedivision.setValue(pageContext,empdiv);

OAMessageTextInputBean  tibedepartment = (OAMessageTextInputBean)webBean.findIndexedChildRecursive("edepartment");
tibedepartment.setValue(pageContext,empdeptt);

OAMessageTextInputBean  tibesubdepartment= (OAMessageTextInputBean)webBean.findIndexedChildRecursive("esubdepartment");
tibesubdepartment.setValue(pageContext,empsubdeptt);

OAMessageTextInputBean  tibefunction = (OAMessageTextInputBean)webBean.findIndexedChildRecursive("efunction");
tibefunction.setValue(pageContext,empfun);

OAMessageTextInputBean  tibecity = (OAMessageTextInputBean)webBean.findIndexedChildRecursive("ecity");
tibecity.setValue(pageContext,empcty);

OAMessageTextInputBean  tibereportto= (OAMessageTextInputBean)webBean.findIndexedChildRecursive("ereporto");
tibereportto.setValue(pageContext,emprpt);

OAMessageTextInputBean  tibestatus = (OAMessageTextInputBean)webBean.findIndexedChildRecursive("estatus");
tibestatus.setValue(pageContext,empst);

OAMessageTextInputBean  tibecasetype = (OAMessageTextInputBean)webBean.findIndexedChildRecursive("ecasetype");
tibecasetype.setValue(pageContext,empct);
//------------------------------------------------------------




OAMessageTextInputBean  tibrno = (OAMessageTextInputBean)webBean.findIndexedChildRecursive("rempno");
tibrno.setValue(pageContext,emprno);

OAMessageTextInputBean  tibrname= (OAMessageTextInputBean)webBean.findIndexedChildRecursive("rempname");
tibrname.setValue(pageContext,emprname);

OAMessageTextInputBean  tibrdesignation = (OAMessageTextInputBean)webBean.findIndexedChildRecursive("rempdesignation");
tibrdesignation.setValue(pageContext,emprdesignation);

OAMessageTextInputBean  tibrdivision = (OAMessageTextInputBean)webBean.findIndexedChildRecursive("rempdivision");
tibrdivision.setValue(pageContext,emprdepartment);

OAMessageTextInputBean  tibrgrade= (OAMessageTextInputBean)webBean.findIndexedChildRecursive("rempgrade");
tibrgrade.setValue(pageContext,emprgrade);

OAMessageTextInputBean  tibrcity = (OAMessageTextInputBean)webBean.findIndexedChildRecursive("rempcity");
tibrcity.setValue(pageContext,emprcity);

OAMessageTextInputBean  tibrdol = (OAMessageTextInputBean)webBean.findIndexedChildRecursive("rdol");
tibrdol.setValue(pageContext,emprdol);

//---------------------


  }

  /**
   * 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);
  }

}

No comments:

Post a Comment