Clear/ Reset Result Table of Search page in OAF
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);
{
super.processRequest(pageContext, webBean);
OAQueryBean queryBean = (OAQueryBean)webBean.findChildRecursive("QueryRN");
// Here QueryRN is your Query Region Name as shown in following snap shot
// 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
No comments:
Post a Comment