Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

@spring.formInput in #list iterator

<#list flowList as flow>
    <@spring.formInput "flow.createDatetime" />
</#list>

flowList is arrayList.

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@8bc713e with arguments of types [java.lang.String,]
    at freemarker.ext.beans.OverloadedMethodModel.exec(OverloadedMethodModel.java:134)
    at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93)

How can I resolve @spring.formInput in #list.

like image 601
Ickhyun Kwon Avatar asked May 22 '26 19:05

Ickhyun Kwon


1 Answers

Have you tried doing an intermediate assign? I saw this problem on other StackOverflow pages, like Freemarker syntax for a form for a collection of objects (Spring 3 MVC):

<#list flowList as flow>
   <#assign flowDate = flow.createDatetime />
   <@spring.formInput "flowDate" />
<\#list>
like image 109
Danalog Avatar answered May 25 '26 16:05

Danalog



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!