Professional Documents
Culture Documents
We need to attach this view object to the application module for this
Double click on application module and move the view object from left side to the right
side window as shown
in the following window.
Create controller
Controller:
For GO button
First we need to create object for application module
SearchAMImpl am = (SearchAMImpl)pageContext.getApplicationModule(webBean);
Then
if(pageContext.getParameter("GO")!=null){
String order = pageContext.getParameter("ORDER");
am.orderSearch(order); //method will be created in am
}
Logic for CLEAR Button
if(pageContext.getParameter("CLEAR")!=null){
pageContext.forwardImmediatelyToCurrentPage(null,false,null);
}
AM:
In AM first we need to create object for VO
SearchVOImpl vo = (SearchVOImpl) getSearchVO();
Then
public void orderSearch(String order) {
SearchVOImpl vo = (SearchVOImpl) getSearchVO(); // object created for vo
vo.setWhereClauseParam(0,order);
vo.executeQuery();
}