[wildfly-dev] h:fileUpload is not invoking setter

Arun Gupta arun.gupta at gmail.com
Mon Dec 9 17:33:31 EST 2013


https://github.com/javaee-samples/javaee7-samples/tree/master/jsf/file-upload
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


More information about the wildfly-dev mailing list