https://github.com/javaee-samples/javaee7-samples/tree/master/jsf/file-up...
is a simple sample that demonstrate the usage of newly added
h:fileUpload component. The usage is pretty straightforward:
<h:form enctype="multipart/form-data">
<h:inputFile value="#{fileUploadBean.file}"/><br/>
<h:commandButton value="Upload"/><p/>
<h2>File Contents:</h2>
<h:outputText value="#{fileUploadBean.text}"/>
</h:form>
However clicking on the button does not invoke the setFile method on
the corresponding bean:
public void setFile(Part file) {
....
}
Any suggestions ?
Arun
--
http://blog.arungupta.me
http://twitter.com/arungupta