1 Reply Latest reply: Sep 12, 2013 4:53 AM by fc67bda8-2700-4459-9472-4fc8e27e8550 RSS

    ADF Issue - LOV based on parameter not appearing

    fc67bda8-2700-4459-9472-4fc8e27e8550

      Hi All,

       

      I am getting error as “AttibuteManagerID required” in my page

       

      Technical Description:

       

      Application Module: EOMUIModelAMImpl.java

      View Object:

      View1: EOMVO

      View2: NameOfNomineeVO - has a criteria Requestor_PersonId =: ManagerId(View criteria have a validation of type 'required' for attribute Requestor_PersonId )

       

      In View1 one of the attribute is NomineePersonId(Long) is an LOV which uses View2. View2 has a criteria with bind variable requestorPersonId(Long) =:ManagerId(Long), which we are setting using the criteria in EOMUIModelAMImpl.java file:

       

      These are the 2 methods used to set criteria in EOMUIModelAMImpl.java class.

      Method setManagerIdUsingCriteria will set ManagerId to display subordinates of Manager.

       

      public Long setRequestorPersonId(){

                 

              Long requestorPersonId = 0L;

       

              try{

      EmployeeOfTheMonthRequestModelAMImpl employeeOfTheMonthRequestModelAM = (EmployeeOfTheMonthRequestModelAMImpl)getEmployeeOfTheMonthRequestModelAM();

      ViewObjectImpl employeeOfTheMonthVO = getEmployeeOfTheMonth();

      System.out.println("----- Before Calling fetchRequestorPersonId in EmployeeOfTheMonthRequestUIModelAMImpl-----");   

                  requestorPersonId = employeeOfTheMonthRequestModelAM.fetchRequestorPersonId().longValue();

      System.out.println("--After Calling fetchRequestorPersonId in EmployeeOfTheMonthRequestUIModelAMImpl--"+requestorPersonId);

      employeeOfTheMonthVO.setApplyViewCriteriaName("EmployeeOfTheMonthVOCriteria");

      employeeOfTheMonthVO.setNamedWhereClauseParam("requestorPersonId", requestorPersonId);

      System.out.println("--End of setRequestorPersonId in EmployeeOfTheMonthRequestUIModelAMImpl--"); 

                  } catch (Exception e) {

      e.printStackTrace();

      }

       

      return requestorPersonId;

          }

         

          /**

      * This method is used to set the value for bind variable ManagerId

      */

      public void setManagerIdUsingCriteria(){

      Long requestorPersonId = 0L;

                 

                  EmployeeOfTheMonthRequestModelAMImpl employeeOfTheMonthRequestModelAM = (EmployeeOfTheMonthRequestModelAMImpl)getEmployeeOfTheMonthRequestModelAM();

      requestorPersonId = employeeOfTheMonthRequestModelAM.fetchRequestorPersonId().longValue();

      System.out.println("--After Calling fetchRequestorPersonId from setManagerIdUsingCriteria--"+requestorPersonId);

      ViewObjectImpl fetchManagerId = getNameOfNominee();

      fetchManagerId.setApplyViewCriteriaName("NameOfNomineeVOCriteria");

      // requestorPersonId =300000001130413L;

      fetchManagerId.setNamedWhereClauseParam("Requestor_PersonId", requestorPersonId);

      fetchManagerId.executeQuery();

      System.out.println("--End of setManagerId in EmployeeOfTheMonthRequestUIModelAMImpl----");

      }

       

       

      Method setManagerIdUsingCriteria() is able to fetch  ‘requestorPersonId’ value but it is not able to set the criteria after query execution.


      Please share your ideas.


      Thanks