2 Replies Latest reply: May 30, 2012 2:57 AM by Tulasi Kamodula RSS

    ADF Lov Switcher Issue

      Hi Frank/All,

      I am using Jdev-

      We have a use case like this in our project:-

      -ADF table with insert and update operations.

      -Attributes are populated through LOV's.

      -Based on value of an attriute like 'SkillTypeID' we have to switch the LOV query at runtime so that 'SkillTypeName' query is different for differend 'SkillTypeId's'.

      -I have used the LOV Switcher method as described by Frank in this pdf http://www.oracle.com/technetwork/developer-tools/adf/learnmore/89-adfbc-lov-switcher-454168.pdf .

      -This is working fine till we are in edit mode.But if we insert a new row in the we get an error error stack starting with these sample errors:-
      oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.lang.NullPointerException, msg=null
           at oracle.jbo.ExprEval.internalEvaluateGroovyScript(ExprEval.java:1218)
           at oracle.jbo.ExprEval.doEvaluate(ExprEval.java:1253)
      - - - - - - - and so on - - - - - - - - - - - - - - - -- -
      The groovy expression that i have used is for the transient Switcher attribute is: "adf.source.getApplicationModule().findViewObject("TaskSkillsVO1").getSkillTypeTranslated();"

      Here getSkillTypeTranslated() is a java method in the VOImpl which returns a translated value of SkillType based on which the LOV is switched.
      public String getSkillTypeTranslated()
      RowSet rowset=this.getRowSet();
      //logic to get the skill type id
      return SkillTypeId;


      Now as far as I can guess,The error is due to null value of current Row being returned by the Groovy Expression(Its just a guess).

      Any help on this would be appreciated.