我正在尝试使用richfaces 文件上传,而fileUploadListener 没有在我的backingbean 中调用监听器。
我的 xthml 中的代码
<rich:fileUpload fileUploadListener="#{fileUploadBackingBean.uploadFile}"
maxFilesQuantity="#{fileUploadBackingBean.uploadsAvailable}"
id="uploadfls"
immediateUpload="#{fileUploadBackingBean.autoUpload}"
acceptedTypes="pdf,vnd.ms-excel,msexcel,xls" allowFlash="#{fileUploadBackingBean.useFlash}">
</rich:fileUpload>
BackingBean 代码
@ManagedBean(name = "fileUploadBean")
public class FileUploadBean {
public void listener(FileUploadEvent event) throws Exception {
System.out.println("listener");
}
}