1 2 Previous Next 16 Replies Latest reply: Apr 10, 2013 6:01 AM by Suresh Karunarathne RSS

    vo.setNamedWhereClauseParam("your param", value); is not working???

    925715
      Hi Everyone,

      My Jdev version is 11.1.2.3.0.
      I have a simple usecase(of a search page) as follows:
      i have two text fields Eno and Ename and one Submit button.
      After entering data into Eno and Ename Text fields, On clicking on Submit button i need to pass Eno to Table T1 and T2 and Eno, Ename to table T3.
      For which i used bind variables in 3 VOs like :
      Lets say only for table T1's VO query we created bind variable "EmpParam" with the below steps:

      1.In the Application Navigator, double-click the view object.
      2.In the overview editor, click the Query navigation tab.
      3.In the Query page, expand the Bind Variables section and click the Create new bind variable button.
      4.In the Bind Variable dialog, enter the name and data type for the new bind variable. And check the Required property. thats it.
      5.After defining the bind variables, the next step is to reference them in the SQL statement included in the where clause of the VO as ---> where empno=:EmpParam.

      And then in initMethod() (Init phase method) i used the below code: (i used this for not showing any values in the tables while the page loads)

      String EmpNo="-1";
      System.out.println("Before Executing Queries");
      BindingContainer bindings7 = getBindings();
      System.out.println("1");
      DCIteratorBinding dcitorg7=(DCIteratorBinding)bindings7.get("EmployeesVO1Iterator") ;
      System.out.println("2");
      ViewObject v7=dcitorg7.getViewObject();
      System.out.println("3");
      v7.setNamedWhereClauseParam("EmpParam", EmpNo);
      System.out.println("5");
      v7.executeQuery();

      The output is like below when the page loads:
      Before Executing Queries
      1
      2
      3
      <UIViewRoot> <notifyPhaseListeners> Exception while processing expression #{backingBeanScope.backing_EmployeesDisplayPage.InitMethod} for attribute beforePhase.
      <UIXEditableValue> <_isBeanValidationAvailable> A Bean Validation provider is not present, therefore bean validation is disabled

      .
      .
      .

      After loading the page, the page is showing all the VO query data in all the Tables T1, T2 and T3.
      What can be the reason behind the above error?
      what steps i missed in my code?
      what can be done to solve this issue?

      Any suggestions will be really useful.

      Thanks.
        1 2 Previous Next