1 Reply Latest reply on Feb 4, 2013 5:19 AM by Priyanka Saxena-Oracle

    Unvalidate(true) in DFF segment PPR

    Priyanka Saxena-Oracle
      Hi,

      I am creating a PPR on a context-sensitive DFF. My requirement is to calculate and display value in one DFF segment(Ex: Segment3) as soon as a value is entered in another DFF segment(Ex: Segment1).

      For this, I have created a PPR on Segment1. But as soon as the PPR event fires, application gives an error for all the required DFF Segment fields for example: "following required fields Segment2,Segment4, Segment5 does not have a value".

      I did setUnvalidate(true) for the DFF Bean itself. But then, in the PFR, when I call the logic to set the Segment3 value, it goes into an error as "Error while finalizing bean: OATableBean, localName='table' java.lang.NullPointerException".

      Below is the code:

      // in process request
      {
      OARenderingContext renderingContext= pageContext.getRenderingContext();

      OADescriptiveFlexBean serialDffBean =
      (OADescriptiveFlexBean)webBean.findChildRecursive("DFFID");
      serialDffBean.processFlex(pageContext);
      if(serialDffBean!=null){
      try {
      serialDffBean.setUnvalidated(true);

      //setting PPR
      OAMessageTextInputBean mtext =(OAMessageTextInputBean)serialDffBean.findIndexedChild("FocusID");

      FirePartialAction FirePartialActionA = new FirePartialAction();

      FirePartialActionA.setEvent("mtextEvent");
      FirePartialActionA.setUnvalidated(true);
      OAMessageTextInputBean.setPrimaryClientAction(mtext,FirePartialActionA);
      }....
      .....

      // in Process form Request

      try
      {
      OracleConnection conn =
      (OracleConnection)am.getOADBTransaction().getJdbcConnection();
      CallableStatement cs = conn.prepareCall(sql);

      cs.setInt(1, pId);
      cs.setString(2, mtextval);
      cs.registerOutParameter(3, OracleTypes.CHAR);
      cs.registerOutParameter(4, OracleTypes.CHAR);

      cs.execute();

      if ("S".equals(cs.getString(3))){


      String sp2 = cs.getString(4);
      XXXVORow.setCAttribute18(sp2);

      }

      else
      {
      String ErrorMessageData = cs.getString(4);
      cs.close();
      throw new OAException("XXX",ErrorMessageData);
      }

      // cs.close();


      } //end of try

      ....
      }

      as soon as the code reaches XXXVORow.setCAttribute18(sp2); there the error "Error while finalizing bean: OATableBean, localName='table' java.lang.NullPointerException". comes up.

      Please help me how to unvalidate the required DFF Segments.

      Thanks!