FreeMarker template error!get(taskList) failed on instance of com.mansuo.tm.model.TMRequirement
The problematic instruction:
----------
==> list item.taskList as item1 [on line 128, column 25 in taskmanager/views/listReqMyCreate.ftl]
----------

解决方案 »

  1.   

    在模板中的list语法有问题.你可以看一下在list处做循环时有什么问题!
      

  2.   

    <#list results as item>
    <tr>
    <td nowrap="nowrap" class="noCell"></td>
    <td class="hideCell">${item.id}</td>
    <td class="hideCell">${item.creator.id}</td>
    <td class="hideCell">${item.code}</td>
    <td><a href="#" onclick="switchPage('actions/requirementAction!showDetail.action?id=${item.id}',true);return false;" title="需求详细信息">${item.code}</a></td>
    <td>${item.title}</td>
    <td>${item.organization.name}</td>
    <td><a href="#" onclick="link4('../base/actions/profile.do?method=showUser&id=${item.creator.id}');return false;">${item.creator.name}</a></td>
    <td align="center">${item.applyTime?string(com.DateFormat)}</td>
    <td>
    <#list item.receiveOrgs as item1>
    <div>${item1.organization.name}
    <#if item1.executant?exists><span style="color:<#if item1.executant.id==currentUser.id>#0000FF<#else>#000000</#if>">
    (<a href="#" onclick="link4('../base/actions/profile.do?method=showUser&id=${item1.executant.id}');return false;">${item1.executant.name}</a>)</span></#if></div>
    </#list>
    </td>
    <td align="right"><#assign count=0>
    <#list item.taskList as item1><#assign count=item1_index+1>
    <div><a href="#" onclick="link4('../base/actions/profile.do?method=showUser&id=${item1.executant.id}');return false;">${item1.executant.name}</a> / 
    <span style="color:<#if item1.status=='unbegin'>#FF0000<#elseif item1.status=='inprogress'>#0000FF<#else>#000000</#if>">${item1.statusLabel}</span> / 
    ${item1.progress?string("0%")}</div>
    </#list><#if (count==0)>&nbsp;</#if>
    </td>
    </tr>
    </#list>
    这是我在listReqMyCreate.ftl文件中找到的代码,刚转学java,请高手们帮忙看一下吧!给我解释下出错原因...