OAF Reusable Scripts

OAF Reusable Scripts



We can use below scripts regularly in our page as part of requirements.



1. How to Create EVENT and SOURCE.


String event = pageContext.getParameter(OAWebBeanConstants.EVENt_PARAM);

String src = pageContext.getParameter(OAWebBeanConstants.SOURCE_PARAM);

Example:


if("event_name".equals(event)) {
System.out.println();
}

Note: if event name is same for two buttons

if("event_name".equals(event) && "itemid".equals(src)) {
System.out.println();
}


2. Reset and Clear Logic


We can use below code to reset the page.

Deploy below code in Process form Request

if(pageContext.getParameter("Reset")!=null) {

        pageContext.forwardImmediatelyToCurrentPage(null, false, null);

    }

Post a Comment

0 Comments