0 Replies Latest reply: Jan 25, 2013 8:24 AM by 818606 RSS

    MessageLovInput item, not able to capture the tab out

    818606
      Hi,

      We are customizing the non-catalog page (iProcurement) to restrict the values displayed in Category and Contract fields (both are MessageLovInput items)

      when user try to enter a partial value in Category field and Tab out, it opens the LOV page; but here we are not able to capture that event in PR or PFR, but we can capture if user clicks on torch icon.

      any idea how to capture the tab out from a LOV item in PPR???

      below is my CO extension

      public class XXNonCatalogRequestCO extends NonCatalogRequestCO
      {
      public void processRequest(OAPageContext oapageContext, OAWebBean oawebBean)
      {
      System.out.println("In PR");
      super.processRequest(oapageContext, oawebBean);
      }

      public void processFormRequest(OAPageContext oapageContext, OAWebBean oawebBean)
      {
      System.out.println("In PFR");
      super.processFormRequest(oapageContext, oawebBean);
      initQuery(oapageContext, oawebBean);

      }

      public void initQuery(OAPageContext oapagecontext, OAWebBean oawebbean)
      {
      OAApplicationModule am = oapagecontext.getApplicationModule(oawebbean);

      String CategoryName = oapagecontext.getParameter("Category");
      String ContractId = oapagecontext.getParameter("ContractId");
      String str1 = oapagecontext.getParameter("event");
      String str2 = oapagecontext.getParameter("source");
      System.out.println("Print Category" +CategoryName);  
      System.out.println("Print Contract" +ContractId);
      System.out.println("Print String1" +str1);  
      System.out.println("Print String2" +str2);  
      if (((("lovPrepare".equals(str1)) || ("lovValidate".equals(str1)) || ("lovUpdate".equals(str1)))) && ("ContractNumberOnNonCat".equals(str2)))
      {
      System.out.println("SS- Setting the Contract Profile option-");
      CallableStatement st1 = null;
      try
      {
      OADBTransaction tr = am.getOADBTransaction();
      String stmt1 ="DECLARE l_rs BOOLEAN; BEGIN l_rs := FND_PROFILE.SAVE_USER('XXPO_CONT_LOV_RESTRICT',NVL(:1,'%')); COMMIT; END;";
      st1 = tr.createCallableStatement(stmt1, 1);
      st1.setString(1, CategoryName);
      st1.execute();
      st1.close();
      //Commit the transaction in the database
      tr.commit();
      OAExceptionUtils.checkErrors(tr);
      }
      catch (SQLException sqle)
      {
      System.out.println(String.valueOf(" exception ").concat(String.valueOf(sqle)));
      throw OAException.wrapperException(sqle);
      }
      }

      if (((("lovPrepare".equals(str1)) || ("lovValidate".equals(str1)) || ("lovUpdate".equals(str1)))) && ("Category".equals(str2)))
      {
      System.out.println("SS- Setting the Category Where caluse-");
      CallableStatement st1 = null;
      try
      {
      OADBTransaction tr = am.getOADBTransaction();
      String stmt1 = "DECLARE l_cat Varchar2(30); l_rs BOOLEAN; Begin Select MAX(replace(attribute3,'00',''))||'%' Into l_cat from po_headers_all where po_header_id = :1; kp_debug('l_cat',l_cat); l_rs := FND_PROFILE.SAVE_USER('XXPO_CAT_CONT_LOV_RESTRICT',NVL(l_cat,'%')); COMMIT; END;";
      st1 = tr.createCallableStatement(stmt1, 1);
      st1.setString(1, ContractId);
      st1.execute();
      st1.close();
      //Commit the transaction in the database
      tr.commit();
      OAExceptionUtils.checkErrors(tr);
      }
      catch (SQLException sqle)
      {
      System.out.println(String.valueOf(" exception ").concat(String.valueOf(sqle)));
      throw OAException.wrapperException(sqle);
      }
      }
      }

      }



      Rgds,
      Kamal

      Edited by: Kamal on 25-Jan-2013 06:22