Execute VO - View Object in Process Form Request in OAF



We need to use process form request method in controller file to display the View Object search results when we click on button.


 public void processFormRequest(OAPageContext pageContext, OAWebBean webBean) {

super.processFormRequest(pageContext, webBean);

String custNum = pageContext.getParameter("CustNumber");

String whereClause = "1=1 ";


if (!searchedCustNum.equals("")) {

whereClause = whereClause + " AND CUSTOMER_NUMBER = '" + custNum + "'";

}


OAApplicationModule searchTrxAM = pageContext.getApplicationModule(webBean);

OAViewObject searchCustVO = (OAViewObject) searchTrxAM.findViewObject("CustomerSearchVO1");

searchCustVO.reset();

searchCustVO.clearCache();

searchCustVO.setMaxFetchSize(-1);

searchCustVO.setWhereClause(whereClause);

searchCustVO.executeQuery();   


}

*/

No comments:

Post a Comment