The model hasIt also has getters and setters.Code:private Date issueDate;
I have the customDate editor registered this way in SimpleFormController.
The jsp page:Code:protected void initBinder(HttpServletRequest request, ServletRequestDataBinder pBinder) { SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy"); pBinder.registerCustomEditor(Date.class, new CustomDateEditor( dateFormat, true)); }
Code:<spring:bind path="pool.issueDate"> <input type="text" name="<c:out value="${status.expression}"/>" size="30" maxlength="30" value="<c:out value="${status.value}"/>"> </spring:bind>
On the jsp page I get the issuedate unformatted. I noticed that getAsText() is never called. On the submission of the form setAsText(String text) is called.
How do I display the formatted date on the jsp page?
Thanks.


Reply With Quote
PropertyEditors will not be called when rendering the object 