How to invoke Single/Bundled) AOL Messages with/without parameters in OAF

//Invoke Single AOL Messages
OAException infoMsg = new OAException("FND","XXCNSI_SAMPLE_AOL_MSG",null,OAException.INFORMATION,
                              null       );
         throw infoMsg ;                               
//Invoke Message with binding parameters
      String poNumStr = "PO-12345-123";
      String amountStr = "9844";
      
      oracle.apps.fnd.common.MessageToken[] tokenArray= 
          { new MessageToken("PO_NUM",poNumStr),
            new MessageToken("P_AMOUNT",amountStr)
          };
      
       OAException infoMsg = new OAException("FND","XXCNSI_PO_MSG",tokenArray,
           OAException.INFORMATION,
                               null       );
          throw infoMsg ;   
//invoke bundled exception message

import com.sun.java.util.collections.ArrayList;
//use the above import for : ArrayList class

            String poNumStr = "PO-12345-123";
            String amountStr = "9844";
            
            oracle.apps.fnd.common.MessageToken[] tokenArray= 
                { new MessageToken("PO_NUM",poNumStr),
                  new MessageToken("P_AMOUNT",amountStr)
                };
            
             OAException infoMsg = new OAException("FND","XXCNSI_PO_MSG",tokenArray,
                 OAException.INFORMATION,
                                     null       );
                                     
                                     
            OAException vaMsg1 = new OAException("FND","XXCNSI_VALIDATION_1",null,
                           OAException.WARNING,      null       );
           
               OAException vaMsg2 = new OAException("FND","XXCNSI_VALIDATION_2",null,
                              OAException.WARNING,      null       );
                              
               OAException vaMsg3 = new OAException("FND","XXCNSI_VALIDATION_3",null,
                              OAException.WARNING,      null       );         
               
               ArrayList list = new ArrayList();
               list.add(vaMsg1);
               list.add(vaMsg2);
               list.add(vaMsg3);
               list.add(infoMsg);
        
                throw   OAException.getBundledOAException(list);

Leave a Reply

Your email address will not be published.