2 Replies Latest reply: Nov 30, 2012 6:30 AM by 949902 RSS

    How to access button which has been added in the region byusing code in OAF

    949902
      Hi,

      I have extended region controller ObjectivesCO. Added two methods in the extended controller:

      1) Process Request (PR)
      2) Process Form Request (PFR)

      I am adding a submit button in one region in process request. When page loads button is created.

      Below code is written in PR

      OAMessageChoiceBean Obj = (OAMessageChoiceBean)oawebbean.findChildRecursive("ObjPerfLevel");
      Obj.setDisabled(true);

      OASubmitButtonBean oasb = (OASubmitButtonBean)createWebBean(oapagecontext, OAWebBeanConstants.BUTTON_SUBMIT_BEAN, null, "Add_Prev");
      oasb.setText("Add Previous Objectives");
      OAFlowLayoutBean FlowLayBean = (OAFlowLayoutBean)oawebbean.findChildRecursive("AddObjFlowLayout");
      FlowLayBean.addIndexedChild(oasb);

      and below code is written in PFR

      if(oapagecontext.getParameter("Add_Prev")!=null)
      {
      throw new OAException("Button clicked",OAException.INFORMATION);
      }

      But when i am clicking on button nothing is happening.

      Please suggest whats wrong in the below code.

      Thanks,
      murali