多个文件上传(条带化) [英] Multiple file upload(stripes)
问题描述
我正在尝试上传文件,该文件将使用Stripes框架接受多个文件.我有一个文件上传工作.我正在尝试了解文档,用于上传多个文件.
根据文档,我所需要做的就是将单个文件示例修改为:
<stripes:form>
<c:forEach ... varStatus="loop">
...
<stripes:file name="newAttachments[${loop.index}]"/>
...
</stripes:form>
ActionBean
private List<FileBean> newAttachments;
public List<FileBean> getNewAttachments() {
return this.newAttachments;
}
public void setNewAttachment(List<FileBean> newAttachments) {
this.newAttachments = newAttachments;
}
要使此示例正常工作,我需要替换什么...
(特别是forEach循环中的那个)?谢谢.
可能应该起作用:
<c:forEach begin="1" end="3" varStatus="loop">
请参见为每个文档添加标签 >
I am trying to make a file upload that will accept multiple files using the stripes framework. I have a single file upload working. I am trying to understand the Documentation for multiple file upload.
According to the doc, all I need to do is modify single file example to:
<stripes:form>
<c:forEach ... varStatus="loop">
...
<stripes:file name="newAttachments[${loop.index}]"/>
...
</stripes:form>
ActionBean
private List<FileBean> newAttachments;
public List<FileBean> getNewAttachments() {
return this.newAttachments;
}
public void setNewAttachment(List<FileBean> newAttachments) {
this.newAttachments = newAttachments;
}
What do I need to replace the ...
(in particular, the one in the forEach loop) with to get this example working? Thanks.
Probably that should work:
<c:forEach begin="1" end="3" varStatus="loop">
see Tag forEach doc
这篇关于多个文件上传(条带化)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!