FileUpload (mode="advanced") in Datatable problem

UI Components for JSF
Post Reply
kamelot
Posts: 21
Joined: 21 Nov 2010, 12:16

18 Aug 2011, 14:30

Hello, I have p:fileUpload inside p:dataTable:

Code: Select all

...
<p:column headerText="Sample">
  <p:fileUpload mode="advanced" auto="true" fileUploadListener="#{addItembean.handleSampleUpload}"/>
</p:column>
...
And I need to pass #{item.id} (ID of item) in particular row (where Upload/Browse button was clicked) in datatable to fileUploadListener
p:ajax cannot be used with file upload. I need to use advanced mode of fileupload, because I cannot use ajax="false" on p:commandButton which sends whole form.
How can I do that?
thanks in advance.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

18 Aug 2011, 14:42

You can't use the advanced uploader in a data component. Use the simpler uploader if you want to use this UI.

kamelot
Posts: 21
Joined: 21 Nov 2010, 12:16

20 Aug 2011, 14:57

I have managed it as following: in dataTable I have a p:commandButton which opens a dialog "Attach a sample" and sets required ID property. In this dialog is placed fileupload in advanced mode :)

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 28 guests