PrimeFaces 在一页上有多个 p:fileUpload 标签 - 只有最后一个标签有效

发布于 2024-12-23 05:06:57 字数 614 浏览 2 评论 0原文

我将 PrimeFaces 3.0-SNAPSHOT 与 JBoss AS7 结合使用。我使用选项 auto=true 将三个 标签放入一种表单中。

问题是,要上传文件,我必须从最后一个表单开始,然后上传到 prelast,最后上传到第一个表单。否则,不会向服务器发送任何内容(FireBug JS 控制台和 Net 控制台中都没有任何内容可观看)。你知道如何解决吗?使用一个组件上传多个文件对我来说不可用。

编辑:表单如下:

<p:fileUpload id="videoThumbnail" 
    fileUploadListener="#{videoWrapper.handleImageUpload}"
    update="#{@form}" process="#{@all}" auto="true" showButtons="false"/>

videoWrapper.handleImageUpload 是典型的 PrimeFaces 上传处理程序。我不附上它,因为我认为这不是问题。请求没有发送到服务器,所以java服务器端似乎是无关的。

I use PrimeFaces 3.0-SNAPSHOT with JBoss AS7. I put three <p:fileUpload> tags in one form with option auto=true.

The problem is that to upload files I have to start with the last form and then upload to prelast and finally to the first one. Otherwise nothing is sent to the server (there is nothing to watch in FireBug JS console nor in Net console). Do you know how to resolve it? Uploading multiple files using one component is not usable for me.

EDIT: Forms are like:

<p:fileUpload id="videoThumbnail" 
    fileUploadListener="#{videoWrapper.handleImageUpload}"
    update="#{@form}" process="#{@all}" auto="true" showButtons="false"/>

And videoWrapper.handleImageUpload is a typical PrimeFaces uploading handler. I don't enclose it, because I think it's not a problem. Requests are not sent to the server, so java server side seems to be unrelated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

他不在意 2024-12-30 05:06:58

我在 PrimeFaces 论坛上得到了答案: http://forum .primefaces.org/viewtopic.php?f=3&t=16917&p=52525。现在这种情况不支持,也许以后会改变。

I got an answer on PrimeFaces forum: http://forum.primefaces.org/viewtopic.php?f=3&t=16917&p=52525. Now this situation is not supported, maybe it will change in the future.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文