Clear/ Reset Result Table of Search page in OAF

Posted by PRajkumar on Oracle Blogs See other posts from Oracle Blogs or by PRajkumar
Published on Mon, 25 Jun 2012 15:53:48 +0000 Indexed on 2012/06/25 21:21 UTC
Read the original article Hit count: 2406

Filed under:

Normally problem faced by developers after creating Search Page is how to Clear/ Reset Result Table when developer open search page first time or after search when developer redirecting back to same search page from any other page (say delete page or update page)

 

Add following Code in your Search page Controller where you have constructed your Query Region

 

import oracle.apps.fnd.framework.webui.beans.layout.OAQueryBean;
...

public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
 super.processRequest(pageContext, webBean);

 OAQueryBean queryBean = (OAQueryBean)webBean.findChildRecursive("QueryRN"); 
 // Here QueryRN is your Query Region Name as shown in following snap shot

 queryBean.clearSearchPersistenceCache(pageContext);
}

 


 

Note –

After add this code, no need to worry about state of Application Module (AM). This code will clean up result table automatically every time when you will open Search page first time and when you are redirecting back to search page. But still as per good coding standard while redirecting back to search page always keep AM state to FALSE

© Oracle Blogs or respective owner

Related posts about /Oracle