To set the where clause to the view object from Controller Java File use the below code:
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean) {
super.processFormRequest(pageContext, webBean);
OAApplicationModule am =
(OAApplicationModule)pageContext.getApplicationModule(webBean);
if (pageContext.getParameter("GoBtn1") != null) {
String orderNumber = pageContext.getParameter("OrderNumberTxt");
String orgName = pageContext.getParameter("OrgNameTxt");
OAViewObject manualSearchVo =
(OAViewObject)am.findViewObject("ManualSearchVO");
//Set where clause to the view object
manualSearchVo.setWhereClause("order_number = nvl(:1,order_number) and org_name = nvl(:2,org_name) ");
//Set the where clause parameters
manualSearchVo.setWhereClauseParam(0, orderNumber);
manualSearchVo.setWhereClauseParam(1, orgName);
//Execute this where clause now
manualSearchVo.executeQuery();
}
}
Comments
Post a Comment