0

I'm trying to add advanced mode of FileUpload in Appfuse project and i followed this link: http://www.primefaces.org/showcase/ui/file/upload/multiple.xhtml.

I add it but when in choose my files, there is no files displayed in growl tag and the upload and cancel button steel disable.

In the terminal of my navigator i have this error : TypeError: undefined is not a function.

Can you help me plzz Thanks

yaityaich
  • 1
  • 1
  • 3
  • I followed this link: http://www.primefaces.org/showcase/ui/file/upload/multiple.xhtml. – yaityaich Aug 13 '14 at 13:29
  • Do you have h:head in the page? It's gonna be guessing without any code – Jaqen H'ghar Aug 13 '14 at 16:09
  • Do you update web.xml? – Mathew Rock Aug 14 '14 at 07:59
  • I add the h:head in tje page but steel not working. @Mathew: Whitch update i have to do in web.xml ? – yaityaich Aug 15 '14 at 08:19
  • it work now wheen i change classpath:META-INF/resources/webjars/jquery/1.9.0/jquery.min.js to classpath:META-INF/resources/webjars/jquery/1.12.0/jquery.min.js in wro.xml but when i click on upload file there is no call to the method fileUploadListener="#{fileUpload.handleFileUpload}" no thing happen. @JaqenH'ghar – yaityaich Aug 15 '14 at 08:45
  • Read this http://stackoverflow.com/questions/8875818/how-to-use-primefaces-pfileupload-listener-method-is-never-invoked – Mathew Rock Aug 25 '14 at 06:51

1 Answers1

0

the showcase has a bug you you need to declare enctype with the value multipart/form-data Example

<h:form enctype="multipart/form-data">
    <p:growl id="messages" showDetail="true" />
 <p:fileUpload fileUploadListener="#{fileUploadView.handleFileUpload}" mode="advanced" dragDropSupport="false"
                  multiple="true" update="messages" sizeLimit="100000" fileLimit="3" allowTypes="/(\.|\/)(gif|jpe?g|png)$/" />

    <p:growl id="messages" showDetail="true" />
</h:form>
Karim
  • 1,004
  • 8
  • 18