【发布时间】:2013-02-06 13:11:36
【问题描述】:
对于我的 Web 应用程序,我想使用 ace:fileEntry 组件。
我尝试了展示柜,但它不起作用。没有错误。 fileEntryListener 永远不会被调用。该文件仍在上传(浏览器 sais),但该文件未存储在服务器上。
这有什么已知的问题吗?
<h:form id="fileUploadForm">
<h:panelGrid id="fileUploadGrid" columns="2" width="100%" styleClass="textEntryInputTable">
<ace:fileEntry id="fileEntryComp"
label="File Entry"
relativePath="uploaded"
fileEntryListener="#{ticketDetailListBean.listener}"/>
<h:commandButton id="submit" value="Datei uploaden" type="submit" styleClass="icebutton" />
<h:message id="msg" for="fileUploadForm:fileEntryComp" infoClass="infoMessage" errorClass="errorMessage"/>
<h:outputFormat value=""></h:outputFormat>
</h:panelGrid>
</h:form>
属性“fileEntryListener”可以设置为任何值。 bean和方法是否存在都没关系。如果我引用一个不存在的 bean,则不会导致错误。这告诉我,从未使用过 Listener。
我正在使用tomcat 7.0.34 和icefaces 3.2.0. 我尝试了自己的实现,但我仍然复制了icefaces 展示的示例。两者都不起作用。
【问题讨论】:
-
感谢您的回复。我在一个简单的 jsf 站点上尝试过,它只包含文件上传。没有弹出窗口或菜单。我正在直接和手动导航到该站点。 jsf 站点是使用与其他托管 bean 通信的模板文件实现的。这会是个问题吗?
-
我想我找到了解决方案。问题是我使用 Icefaces 来实现新的站点。但我已经有struts网站。并且所有站点(也包括 Icefaces 站点)都通过了 Struts 过滤器。那仍然是问题..
标签: java icefaces icefaces-3