having problem in file upload using primefaces...
<p:fileUpload value="#{beanController.file}" mode="simple"/>
value is not setting in file object of UploadedFile type setter in beanController...
There is no exception while uploading file but null pointer exception occur when i try to read the file object from getter
any one know the reason?
<p:fileUpload
-
- Posts: 2
- Joined: 05 Nov 2013, 20:57
I strongly suspect you might have missed enctype on your form .
Code: Select all
<h:form enctype="multipart/form-data"><p:fileUpload value="#{beanController.file}" mode="simple"/> </h:form>
i also tried enctype="multipart/form-data" in form tag but no effect..
There is a mysterious thing that following code is running perfect with fileUpload advance mode
public void handleFileUpload(FileUploadEvent event) {
file = event.getFile();
}
But when i use fileUpload simple mode with value = "#{beanController.file}" then file setter is not taking its value ..
There is a mysterious thing that following code is running perfect with fileUpload advance mode
public void handleFileUpload(FileUploadEvent event) {
file = event.getFile();
}
But when i use fileUpload simple mode with value = "#{beanController.file}" then file setter is not taking its value ..
Hi All,
In the PrimeUI forum, you won't get much help about PrimeFaces questions. Use the dedicated forum.
regards
Rudy
In the PrimeUI forum, you won't get much help about PrimeFaces questions. Use the dedicated forum.
regards
Rudy
PrimeFaces version 3.5, Tomcat 7, Mojarra 2.1.13
PrimeFaces version 4.0, Glassfish 4.0
PrimeFaces version 5.0, WLS 12.1.2
If you haven't read the forum rules read them now : viewtopic.php?f=3&t=1194
PrimeFaces version 4.0, Glassfish 4.0
PrimeFaces version 5.0, WLS 12.1.2
If you haven't read the forum rules read them now : viewtopic.php?f=3&t=1194
-
- Posts: 3
- Joined: 10 Dec 2015, 10:39
Hi,
I can't find any answer for this exact problem and I tried all the solutions that was related to p:fileUpload.
Can you help me?
Thanks!
I can't find any answer for this exact problem and I tried all the solutions that was related to p:fileUpload.
Can you help me?
Thanks!
-
- Information
-
Who is online
Users browsing this forum: No registered users and 3 guests