Can we use spring FTL based form validations with any controller other than SimpleFormController
Posted
by Adhir Aima
on Stack Overflow
See other posts from Stack Overflow
or by Adhir Aima
Published on 2010-04-12T10:58:35Z
Indexed on
2010/04/12
11:03 UTC
Read the original article
Hit count: 449
spring-mvc
|freemarker
Hi,
Because of some design specification we have to extend all controllers in spring MVC from a class that extends AbstractCommandController. I am trying to include the spring FTL based form validations in my FTL file, but it gives me an error like
Method public org.springframework.web.servlet.support.BindStatus org.springframework.web.servlet.support.RequestContext.getBindStatus(java.lang.String) throws java.lang.IllegalStateException threw an exception when invoked on org.springframework.web.servlet.support.RequestContext@b05cd7 with arguments of types [java.lang.String,]
The problematic instruction:
==> assignment: status=springMacroRequestContext.getBindStatus(path) [on line 120, column 9 in spring.ftl]
in user-directive spring.bind [on line 47, column 33 in myProfile.ftl]
Java backtrace for programmers:
freemarker.template.TemplateModelException: Method public org.springframework.web.servlet.support.BindStatus org.springframework.web.servlet.support.RequestContext.getBindStatus(java.lang.String) throws java.lang.IllegalStateException threw an exception when invoked on org.springframework.web.servlet.support.RequestContext@b05cd7 with arguments of types [java.lang.String,]
I have put the command name properly in the controller class and in the controller class, neither the specified name nor the default "command" works.
Some help please. And would be much appreciated if it comes with an example.
Thanks in advance, Adhir Aima
© Stack Overflow or respective owner