I am upgrading a web app from SPring 2.5 to Spring 5. My Controller shows a populated Model Object here;
@RequestMapping(value = "/es/orderinfo.html", method = RequestMethod.GET)
public ModelAndView initForm(
@RequestParam("id") long id,
HttpServletRequest request){
Order order = getDAOFactory().getOrderDAO().load(id);
OrderInfoBean bean = new OrderInfoBean();
bean.setOrder(order);
ModelAndView mv = new ModelAndView("es/orderinfo", "command", bean);
return mv;
}
And in my JSP, if I put a typo in the path of a select, I get the runtime error indicating that the Spring runtime has correctly validated my command object. The correct path looks like:
<form:select path="order.orderType"
tabindex="100" cssStyle="width:149px">
<form:option value="">none</form:option>
<form:options items="${refData.orderTypes }" itemValue="id" itemLabel="typeName" />
</form:select>
...BUT after 15 hrs, the values of the model are not being used in any input fields, textareas, inputs, selects... ...so somehow there is a gap between the GET mapped controller function that is giving a populated formBackingObject (Model) and the JSP which sees that Class/Type but is not getting the data. BTW the reference data (e.g. refData.order.Types) is coming through to the JSPs fine....