组件rich:fileUpload
支持onclear
事件,但我无法区分CLEAR事件和CLEARALL事件。代码:
<rich:fileUpload fileUploadListener="#{WF_Attachment_BB.uploadListener}"
maxFilesQuantity="#{WF_Attachment_BB.availableQuantity}"
autoclear="false"
clearControlLabel="clear"
clearAllControlLabel="clearAll"
onclear="clearFunc()"
id="upload" >
</rich:fileUpload>
<a4j:jsFunction id="clearFunc" name="clearFunc" ajaxSingle="true"
actionListener="#{WF_Attachment_BB.clearUploadData}">
<a4j:actionparam name="fName"/>
</a4j:jsFunction>
我想这样做:当我点击clearControlLabel
时,WF_Attachment_BB.clearUploadData
会从服务器清除一个,当我点击clearAllControlLabel
时,WF_Attachment_BB.clearUploadData
会从服务器清除所有内容。 / p>