2 Replies Latest reply: Nov 22, 2012 10:40 PM by Charith Kulawardana RSS

    Set whereclause programmertically

    Charith Kulawardana
      Dear experts,

      I'm developing Jdeveloper 11.1.2.2.0
      I have 2 viewobjs.Both having 2 Choise list components( Let say A & B).
      I want to change B depend on the value selected in A.
      Then I set bind variable to the where clause to the query which contain 'B'.
      I added following code to my 'AppModuleImpl' class.


      public void setWhereCluseforViewObj(String RequiredType){

      NameViewObjImpl vo= (NameViewObjImpl)getNameViewObjImpl1();
      vo.setNamedWhereClauseParam("P_TYPE",RequiredType);
      vo.executeQuery();
      }

      Then I call above method within the setMethodForA in ViewAObjRowImpl class.
      Then I set auto submit 'true' for A.

      But after running ,when I change the A page popup nullpoint Exception.
      I guess that i'm calling above method in a wrong place.
      How can I solve this?
      Pls help
      Thanks.

      Edited by: Charith Kulawardana on Nov 22, 2012 7:37 PM