OAF Events Handling
1. Button (SubmitButton)
//In Below Code: “showDetails” refers to the ID of the submitButton Item
if(pageContext.getParameter(“showDetails”)!=null)
{
am.invokeMethod(“showStudentData”);
}
2. PopList
//In the belowCode “bgPopEvent” refers to the fireAction Property of the link Item
if(eventName!=null && “bgPopEvent”.equals(eventName))
{
OAMessageChoiceBean bgPopIDBean = (OAMessageChoiceBean)webBean.findIndexedChildRecursive(“bgPopID”);
String displayStr = bgPopIDBean.getSelectionText(pageContext) ; // Display Attribute
String valueStr = bgPopIDBean.getSelectionValue(pageContext); // Value Attribute
throw new OAException(“Poplist is fired —> Bg Name—>” + displayStr + ” BG Id –>”+ valueStr, OAException.INFORMATION) ;
}
3. LOV
//In Below Code : “orgIDLovID” refers to the ID of messageLovInput
String lovSourceID = pageContext.getLovInputSourceId();
if(lovSourceID!=null && lovSourceID.equals(“orgIDLovID”) )
{
OAMessageLovInputBean orgIDLovIDBean = (OAMessageLovInputBean)webBean.findIndexedChildRecursive(“orgIDLovID”);
String orgIDValue = (String)orgIDLovIDBean.getValue(pageContext);
OAException exc= new OAException(“Selected OrgID–>”+ orgIDValue, OAException.INFORMATION) ;
throw exc;
// throw new OAException(“Selected OrgID–>”+ orgIDValue, OAException.INFORMATION) ;
}
4. HyperLink
//In the belowCode “imageEvent” refers to the fireAction Property of the link Item
String eventName = pageContext.getParameter(EVENT_PARAM) ;
if(eventName!=null && “linkEvent”.equals(eventName) )
{
throw new OAException(“User Raised an Event On Link–>”, OAException.INFORMATION) ;
}
5. Image
//In the belowCode “imageEvent” refers to the fireAction Property of the image Item
String eventName = pageContext.getParameter(EVENT_PARAM) ;
else if(eventName!=null && “imageEvent”.equals(eventName) )
{
throw new OAException(“User Raised an Event on Image –>”, OAException.INFORMATION) ;
}