I am using Spring SimpleFormController to process the form. In my case, the editing view (JSP) may vary depending on what is being edited. SimpleFormController formView is a field (class variable), which means that it is shared by all threads using its instance. Thus, it is unsafe (and not necessary) to set formView (via setFormView ) to formBackingObject . My question is, is it possible to use SimpleFormController with various kinds of editing based on some context?
Follow up actions . showForm(HttpServletRequest req, HttpServletResponse resp, BindException errors) looking at the source, I can override showForm(HttpServletRequest req, HttpServletResponse resp, BindException errors) and call showForm(HttpServletRequest req, BindException errors, String viewName) with whatever view I want.
java spring
Steve kuo
source share