Multiple file upload(stripes)

淺唱寂寞╮ 提交于 2019-12-11 18:25:00

问题


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.


回答1:


Probably that should work: <c:forEach begin="1" end="3" varStatus="loop">

see Tag forEach doc



来源:https://stackoverflow.com/questions/20995065/multiple-file-uploadstripes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!