two or more file upload in the same form

UI Components for JSF
Post Reply
pauga
Posts: 22
Joined: 03 Jun 2011, 08:49

30 Aug 2011, 13:06

Hi,

I´m trying to use two fileupload component in the same form. I need one for upload an image and other for a document.

Someone knows how to do something like that??? Maybe it could be a bug of primefaces.

I´m using primefaces-3.0-M3 in Firefox5 and google Chrome.

In my case, only the second fileupload works fine. If i click the first upload, nothing happen. But if i click the second fileupload i can see the same progress bar during the upload in both fileupload component. This is what i see:

Image


and i need that each fileupload show its own progress bar when i click on its.

I´m doing test with this code:

<h:form>
<p:fileUpload id="photo"/>
<p:fileUpload id="document"/>
</h:form>


Sorry for my english...

rdeoliveira
Posts: 61
Joined: 23 Jun 2011, 11:40

31 Aug 2011, 10:13

Same problem.
Last edited by rdeoliveira on 31 Aug 2011, 14:46, edited 1 time in total.
JSF 2.0
Primefaces 3.0.M3
Tomcat 7.0
--
French user of primefaces

robert.m
Posts: 226
Joined: 07 Dec 2010, 22:52
Location: Salzburg/Austria

31 Aug 2011, 11:23

Have you tried putting each of the fileuploads in a separate form?

pauga
Posts: 22
Joined: 03 Jun 2011, 08:49

01 Sep 2011, 09:14

Hi,

the problem was that i have to use two fileupload inside one wizard´s tab. I use what you said and it works fine:

<h:form>

<p:wizard>

<p:tab>

<h:form>
<p:fileupload id="file1" />
</h:form>

<h:form>
<p:fileupload id="file2" />
</h:form>

</p:tab>

</p:wizard>

</h:form>

I don´t know if it is a correct way to do it, but it works....


Thanks for helping me.

rdeoliveira
Posts: 61
Joined: 23 Jun 2011, 11:40

10 Oct 2011, 18:35

This solution doesn't work in Internet Explorer. IE doesn't allow nested forms.

Have you any workaround for doing this in IE. Thanks again.
JSF 2.0
Primefaces 3.0.M3
Tomcat 7.0
--
French user of primefaces

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 42 guests