我想使用王牌:FileEntry的組件上傳文件 ,但我不斷收到該操作方法不存在 錯誤這裏是我努力:javax.el.MethodNotFoundException與王牌:FileEntry的組件
1- 王牌:FileEntry的部件
<h:form>
<ace:fileEntry id="fileEntryComp"
label="File Entry"
relativePath="uploaded"
fileEntryListener="#{userBean.uploadFile}"/>
<h:commandButton value="Upload File" action="#{userBean.uploadFile}"/>
</h:form>
2- 的UserBean:
public void uploadFile(FileEntryEvent event) {
FileEntry fileEntry = (FileEntry) event.getSource();
FileEntryResults results = fileEntry.getResults();
for (FileEntryResults.FileInfo fileInfo : results.getFiles()) {
if (fileInfo.isSaved()) {
log.debug("########### FILE IS SAVED ########");
}
}
}
例外:
javax.el.MethodNotFoundException: /uploadFiles.xhtml @32,81 action="#{userBean.uploadFile}": Method not found: [email protected]()
如何設置這種情況下的方法? 會有人告訴我,在XHTML頁面的方法調用應該採取一個參數如豆,但我會回答說我沒有在這裏的例子中提到:
http://wiki.icefaces.org/display/ICE/FileEntry
請告知。
隨着你上次的編輯,你引入了一個錯字。請修復它;這是一個紅鯡魚。 – BalusC
大量的工作時間導致我這樣愚蠢的錯誤,我添加了一個答案,如果你認爲話題應該被刪除,刪除它。 –
是的,我看到了你的答案,我已經刪除了我的答案,同時我正在輸入一個答案。 – BalusC