-
1. Re: rich:fileupload problem.
ilya_shaikovsky Jan 21, 2010 4:58 AM (in response to agallo73)File Upload do not holds files itself but just passing them to listener in order you to store them. So every time it's reREndering its didn't care about the files which aleady being uploaded in the past. So it's impossible to show something in upload from previous uploads list. -
2. Re: rich:fileupload problem.
agallo73 Jan 21, 2010 6:00 AM (in response to ilya_shaikovsky)Ok thanks.
So, How can I solve this problem? There's no solution that you think may help me?
I thought that being my bean session scope defined there was some way to keep some data. The uploaddata attribute should serve this purpose being it related to the data being uploaded.When I upload a new file, I saw that the framework automatically populates the list pointed by the uploaddata attribute. So why not using this variable to rerender the component when coming back?
Am I saying stupid things?
Moreover I would like to cancel a file from my bean in memory list when someone press clears in the fileupload component.
I think that i may use a4j:support event="onclear" actionListener="someListener"
but I can I figure out which file has been removed and which event I have to manage in my listner method?
Is there some information there as far as the element being removed?
Thanks very much.
Bye.
-
3. Re: rich:fileupload problem.
igor.igolkin Mar 18, 2010 4:13 AM (in response to ilya_shaikovsky)so, fileuploader has the different behavior from other gui components and breaks view<->model concept,
why?
also, for example, we can have some inputs on page with fileuploader and if validation fail on these fields then fileuploader become empty and user will be confused, bad behavior….
-
4. Re: rich:fileupload problem.
ilya_shaikovsky Mar 18, 2010 5:31 AM (in response to igor.igolkin)Thanks for your report! Now we will discuss possible inclusion to upcoming release https://jira.jboss.org/jira/browse/RF-8538
About handling upload itself - it's standard way to make the user responsible for storing the files at server side and not just put to model.
-
5. Re: rich:fileupload problem.
m.a.g Apr 4, 2010 12:00 PM (in response to ilya_shaikovsky)RF-8538 was closed as "Cannot Reproduce"!
-
6. Re: rich:fileupload problem.
nbelaevski Apr 4, 2010 4:42 PM (in response to m.a.g)Denis,
Right, I couldn't reproduce the problem described in RF-8538. Additional investigation showed that the problem was in incorrect test code (nested a4j:support for "onuploadcomplete" that wasn't ajaxSingle). Do you have any issues with file upload & validation? Please let us know.
-
7. Re: rich:fileupload problem.
brenoaraujo Jan 7, 2011 3:13 PM (in response to nbelaevski)Nick,
the problem reported by Antonio is that he can't restore the fileUpload component.
I'm having the same trouble. My scenario is that I'm adding a uploadData (list of UploadItem's) and it has not been displayed.
Do you have any solution for this? I just want to show to user the files that he has uploaded in the same component.
Thanks
-
8. Re: rich:fileupload problem.
nbelaevski Jan 10, 2011 10:44 AM (in response to brenoaraujo)Breno,
So, can you please clarify what's the problem? Is it that uploaded data is not displayed or uploaded files list is cleared out when user uses 'back' etc buttons?
-
9. Re: rich:fileupload problem.
brenoaraujo Jan 10, 2011 12:22 PM (in response to nbelaevski)Both problems happens.
If I associate the uploadData to a list os Upload itens in ManagedBean the itens are not displayed when page is rendered.
If I restore a MB state that has uploaded files within the fileUpload component this files desappears.
Example for problem 1:
at JSP:
<rich:fileUpload uploadData="#{MB.fileLst}"/>
at MB:
private List<UploadItem> fileLst = new ArrayList<UploadItem>();
public String showMB() {
fileLst.add(new UploadItem("example.txt", 1024, "text/plain", file));
return "navigationURL";
}
When page is rendered there are no upload itens in fileUpload componente.
-
10. rich:fileupload problem.
nbelaevski Jan 10, 2011 1:52 PM (in response to brenoaraujo)Ok, I see - such feature is not supported.
-
11. rich:fileupload problem.
brenoaraujo Jan 10, 2011 2:17 PM (in response to nbelaevski)Why you don't implement the save and restore state for this component?