So I have an xhtml page that contains the following code:
<rich:fileUpload
id="uploadReportTemplate"
addControlLabel="Add XSLT"
fileUploadListener="#{manageFeedTypeAction.fileUploadListener}"
uploadData="#{manageFeedTypeAction.data}"
listWidth="63px" listHeight="0px" maxFilesQuantity="1"
immediateUpload="true" acceptedTypes="xsl,xslt"
allowFlash="false"
status="eventQueueFileUpload"
ontyperejected="javascript:Richfaces.showModalPanel('wrongSelectionModal');this.disabled=false">
<a4j:support event="onuploadcomplete" reRender="fileUploadPanel"/>
</rich:fileUpload>
I am only allowing the user to upload one file. Once this file has been uploaded, I wish to check if the file contains a certain keyword. How can I check whether the file contains that keyword? Please help.
I was able to solve this by adding the following code to the fileUploadListener method being called at
fileUploadListener="#{manageFeedTypeAction.fileUploadListener}"above: