OAF Event Handling

Button(SubmitButton)

//In Below Code: “showDetails” refers to the ID of the submitButton Item
if(pageContext.getParameter("showDetails")!=null)
{
am.invokeMethod("showStudentData");
}

PopList (DropDown)

//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) ;
}

LOV (List of Values)

//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) ;
}

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) ;
}

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) ;
}

Comments |0|

Legend *) Required fields are marked
**) You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
Category: OAF