日期:2014-05-17  浏览次数:20848 次

freemarker 多个list嵌套使用
本帖最后由 asp_c 于 2010-08-02 18:43:25 编辑
红色字体无法运行
<#if ScheduleAdherenceList??>  //jsp传过来的list 1
    <#list ScheduleAdherenceList as bean>
          <tr>
              <td class="${getTdClass(bean_index)}" align="center">${bean.ProductName}&nbsp;</td>
               <#if titlesize??>////jsp传过来的list 2
                     <#list titlesize as bean1>
                          <td class="${getTdClass(bean1_index)}" align="center">${bean.${bean1_index+1}}</td>//用于取第一个list中bean的值,但是这个参数是来自第二个List的bean中
                      </#list>
               </#if>
           </tr>
     </#list>
</#if>

------解决方案--------------------
感觉嵌套的太多了吧