In your controller implementation, you can override referenceData(HttpServletRequest request, int page):
Example:
Here you could retrieve the Resource Set from your DAO.Code:protected Map referenceData(HttpServletRequest request, int page) { Map model = new HashMap(); model.put("locationList", Location.getValues()); return model; }
I am using my domain object as form backing object as well; it has an attribute.Code:private Location location
Then in your JSP, you would say:
In your case, you might have to write a custom PropertyEditor for resolving the reference to the Resource Object. See: http://forum.springframework.org/sho...propertyeditorCode:<spring:bind path="command.location"> <select name="<c:out value="${status.expression}"/>"> <c:forEach var="location" items="${locationList}"> <option value="<c:out value="${location.code}"/>"> <c:out value="${location.name}"/></option> </c:forEach> </select> </spring:bind>


Reply With Quote
