1 Reply Latest reply: Jan 10, 2014 6:01 AM by Subramanian Meyyappan RSS

    Viewobject execute thriws null first time.

    VineetTripathi

      Hi,

       

      I am executing my view criteria as under:

       

                  ViewObject viewObject = getViewObject("CmsalesSearchAMDataControl", "UDFDropDownVO1");

                  ViewCriteriaManager vcm = viewObject.getViewCriteriaManager();

                  vcm.setApplyViewCriteriaName("UDFDropDownVOCriteria");

                  viewObject.setNamedWhereClauseParam("udfId", udfID);

                  viewObject.executeQuery();

       

                  UDFDropDownVORowImpl curr = (UDFDropDownVORowImpl)viewObject.getRowAtRangeIndex(i);

                  String DropdownId = (String)curr.getAttribute("UdfDropdownId");

       

      I dont know why but on first time it is throwing Null pointer error for DropdownId .

      First time mean when i logged into my application.

      Everytime else it is wokring fine. Like if I come to same page again then it will execute succesfully and give the result too.

       

      Thanks,

       

      .