0
我怎麼能寫這樣FreeMarker的模板:spring.ftl(freemarker綁定)是否支持嵌套路徑?怎麼樣?
<#import "spring.ftl" as s>
<@s.form path="object" action="/new.do" method="POST">
<@s.formInput "name"/> <!-- I want this resolved as "object.name" -->
<!--
100s of other properties...
-->
</@s.form>
,而不是這樣的:
<#import "spring.ftl" as s>
<form action="/new.do" method="POST">
<@s.formInput "object.name"/>
<!--
100s of other properties...
-->
</form>
好吧,我要試試... – 2010-08-19 13:21:55
它不起作用。我得到了一個 「Method public org.springframework.web.servlet.support.BindStatus org.springframework.web.servlet.support.RequestContext.getBindStatus(java.lang.String)throws java.lang.IllegalStateException。」 我注意到在formInput宏中,它再次與給定路徑綁定,替換上一個,我想... 我使用的是spring-webmvc-3.0.3.RELEASE提供的spring.ftl。罐子 感謝您的任何進一步的建議。 ;) – 2010-08-19 19:56:36