Anil's Blog is Best Viewed on GOOGLE CHROME

Showing posts with label Event. Show all posts
Showing posts with label Event. Show all posts

Sunday, April 20, 2014

Create event programatically


Use this code to set event (could be FirePartialAction or FireAction) on any field.

    public void processRequest(OAPageContext pageContext, OAWebBean webBean) {

super.processRequest(pageContext, webBean);

oracle.cabo.ui.action.FireAction FireActionA = new oracle.cabo.ui.action.FireAction();
FireActionA.setEvent("RevenueEvent"); //Event Name
FireActionA.setUnvalidated(true);
revenuechk.setPrimaryClientAction(FireActionA); //revenuechk is the Id of the field

 public void processFormRequest(OAPageContext pageContext, OAWebBean webBean){

super.processFormRequest(pageContext, webBean);

if("RevenueEvent".equals(pageContext.getParameter(SOURCE_PARAM)))

{
//Event handling here
}
Thanks,
Anil