81,094
社区成员
发帖
与我相关
我的任务
分享
imageObj.setImage(encoder.encode(data));
list.add(0, imageObj);
list.add(1, imageObj);
dataMap.put("images", list);
这样 list下面有两个 imageObj对象,每个imageObj对象下都有一个image字段,请问在ftl文件<w:binData w:name="wordml://02000001"+images_index+1+".jpg" xml:space="preserve">${images.image}</w:binData>
<v:shape id="图片 1" o:spid="_x0000_i1025" type="#_x0000_t75" style="width:414.75pt;height:207.75pt;visibility:visible;mso-wrap-style:square">
<v:imagedata src="wordml://02000001"+images_index+1+".jpg" o:title="菜单"/>
该怎么改才能正常迭代出list里的两张图片呢??谢谢! <#list images as im>
<w:pict>
<v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f">
<v:stroke joinstyle="miter"/>
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0"/>
<v:f eqn="sum @0 1 0"/>
<v:f eqn="sum 0 0 @1"/>
<v:f eqn="prod @2 1 2"/>
<v:f eqn="prod @3 21600 pixelWidth"/>
<v:f eqn="prod @3 21600 pixelHeight"/>
<v:f eqn="sum @0 0 1"/>
<v:f eqn="prod @6 1 2"/>
<v:f eqn="prod @7 21600 pixelWidth"/>
<v:f eqn="sum @8 21600 0"/>
<v:f eqn="prod @7 21600 pixelHeight"/>
<v:f eqn="sum @10 21600 0"/>
</v:formulas>
<v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
<o:lock v:ext="edit" aspectratio="t"/>
</v:shapetype>
<w:binData w:name="${"wordml://0200000"+im_index+1+".jpg"}" xml:space="preserve">${im}</w:binData>
<v:shape id="图片" o:spid="_x0000_i1025" type="#_x0000_t75" style="width:414.75pt;height:207.75pt;visibility:visible;mso-wrap-style:square">
<v:imagedata src="${"wordml://0200000"+im_index+1+".jpg"}" o:title="菜单"/>
</v:shape>
</w:pict>
</#list>
好了已经解决了,就是图片指定的src和 w:name 没有设置为变量。