Saturday, September 13, 2014


OAF - Oracle Application Framework - Frequently Used Items For User Action.

Following is the way you can catch the event for an item based on its item style.


SNO
Component Name(Item Style)
How to Catch the event in CO
1
submitButton
You can catch the submit button in two ways :
1.       Here : save is item id
 if(pageContext.getParameter("save")!=null)
2.       Here  requestTypeAction   is the action event name mentioned on the item in client Action (Action Type) if("requestTypeAction".equals(pageContext.getParameter(EVENT_PARAM)))
2
messageLovInput
if (pageContext.isLovEvent())  
            { 
            String lovInputSourceId = pageContext.getLovInputSourceId(); 
      //checking which lov event is fired. 
      //Below countryID is the ID of messageLovInput 
         if ("countryID".equals(lovInputSourceId)) 
             { 
               //Invokes AM Method  
                 OAMessageLovInputBean countryIDBean = (OAMessageLovInputBean)webBean.findIndexedChildRecursive("countryID");
                 String countryID = countryIDBean.getText(pageContext);
                 System.out.println("Country ID Value-->"+ countryID);
             }
}
3
messageChoice
Here  requestTypeAction   is the action event name mentioned on the item in client Action (Action Type) if("requestTypeAction".equals(pageContext.getParameter(EVENT_PARAM)))
4
link(Hyperlink)
Here  requestTypeAction   is the action event name mentioned on the item in client Action (Action Type) if("requestTypeAction".equals(pageContext.getParameter(EVENT_PARAM)))
5
Passing Parameters From One Page To Another
if(pageContext.getParameter("submit1")!=null)
           {
                 HashMap hmap = new HashMap();
              OAMessageStyledTextBean headerBean = (OAMessageStyledTextBean)webBean.findIndexedChildRecursive("headerID");
              String reqHeaderID = headerBean.getText(pageContext);
              hmap.put("p_headerID", reqHeaderID);
              hmap.put("p_submit_msg","Y") ;
               pageContext.setForwardURL(
                     "OA.jsp?page=/xxcus/oracle/apps/fnd/ear/webui/EmpCreateUpdateReqPG",
                     null,                            
                     OAWebBeanConstants.KEEP_MENU_CONTEXT,                                                    
                     null,                                                   
                     hmap,                            
                     true,
                     OAWebBeanConstants.ADD_BREAD_CRUMB_NO,
                     OAWebBeanConstants.IGNORE_MESSAGES); 
            
           }






Method :   oapagecontext.getParameter("event"); returns the current event name

No comments: