| Author |
DataTable and UploadFile
|
Michele Mazzilli
Greenhorn
Joined: May 09, 2011
Posts: 3
|
|
Hello everyone,
Goal: In a jsf page, I defined a dataTable and a uploadFile. For Each file uploaded, the datatable will must update. I use a primefaces lib.
The code that i wrote:
Well, the problem is:
For each successfull upload file, dataTable show always last entry inserted because attachments in EditArticle managedBean is always empty.
Any idea??? Heeeelp
Thanks for all...
|
 |
Guy deLyonesse
Ranch Hand
Joined: Apr 12, 2011
Posts: 189
|
|
|
What's the scope of your managed bean?
|
 |
Michele Mazzilli
Greenhorn
Joined: May 09, 2011
Posts: 3
|
|
Guy deLyonesse wrote:What's the scope of your managed bean?
hello Guy deLyonesse,
first, thank you for replay.
The scope is request, because i load from Db the Article with attachments if param.id is valorized.
|
 |
Guy deLyonesse
Ranch Hand
Joined: Apr 12, 2011
Posts: 189
|
|
I was just looking at a portlet I built that does exactly the same thing (except the files are uploaded as opposed to coming from a DB) but I'm using JSF 1.2 so I'm not sure how useful the code would be to you if you're in JSF 2.0.
In my backing bean:
The upload method:
And the relevant part of the view.xhtml
I'm using ICEfaces but the idea is the same for straight JSF.
|
 |
Michele Mazzilli
Greenhorn
Joined: May 09, 2011
Posts: 3
|
|
Nada ... the attachment list is always empty.
maybe why the call is not Ajax?
tnx
|
 |
 |
|
|
subject: DataTable and UploadFile
|
|
|