Search and Display data on same page
Hi,
I am trying to do a search and display the results on the same page. When I try to do this I get the following error.
Neither BindingResult nor plain target object for bean name 'faxstatusrequest' available as request attribute'
Please find the below code of my configuration xml, controller and jsp page:
<bean id="statusRequestController" class="com.ge.vsifaxstatus.controller.FaxStatusReq uestController">
<property name="sessionForm"><value>true</value></property>
<property name="commandName"><value>faxstatusrequest</value></property>
<property name="commandClass"><value>com.ge.vsifaxstatus.bea n.FaxStatusRequest</value></property>
<property name="validator"><ref bean="faxstatusRequestValidator"/></property>
<property name="formView"><value>statusform</value></property>
<property name="successView"><value>statusform</value></property>
<property name="statusBO">
<ref bean="statusRequestBO"></ref>
</property>
</bean>
Here is my controller onSubmit method :
String refId = ((FaxStatusRequest) command).getUsageId();
FaxStatusRequest faxstatusrequest = ((FaxStatusRequest) command);
logger.info("The service reference id is : " + refId );
List statusList = statusBO.getFaxStatus(refId);
//Map modelMap = errors.getModel();
myModel.put("status",statusList);
logger.info("returning from ModelAndView controller method : " + getSuccessView());
return new ModelAndView("statusform","statusMap",myModel);
And the jsp code is :
<c:forEach items="${statusMap.status}" var="details">
<table>
<tr>
<td class="textdisplay">Fax Number :</td>
<td class="textdisplayBlack"><c:out value="${details.faxNumber}"/></td>
</tr>
I would appreciate any help.
Thanks in advance.