[
https://issues.jboss.org/browse/RF-13323?page=com.atlassian.jira.plugin.s...
]
Jiří Štefek edited comment on RF-13323 at 11/13/13 3:11 AM:
------------------------------------------------------------
I've attached here a simple project with 2 samples, one is using @SessionScoped and
the second @ViewScoped bean. Both backing beans work correctly. Tried it on GlassFish
3.1.2.2, AS 7.1 with Chrome 30 and Firefox 25. So unless [~wish79] could give us a sample
project, i cannot reproduce it.
----
But one thing I've noticed, when you place _fileUpload_ in the ajax rendered
_outputPanel_ just like this:
{code}
<a4j:outputPanel ajaxRendered="true">
<rich:fileUpload listener="#{listener}"/>
</a4j:outputPanel>
{code}
and you will upload a file, then the components list of uploaded files disappears after
each upload (doesn't matter which backing bean is used). [~bleathem] is this an
intention? Or should we file an issue?
was (Author: jstefek):
I've attached here a simple project with 2 samples, one is using @SessionScoped
and the second @ViewScoped bean. Both backing beans work correctly. Tried it on GlassFish
3.1.2.2, AS 7.1 with Chrome 30 and Firefox 25. So unless [~wish79] could give us a sample
project, i cannot reproduce it.
----
But one thing I've noticed, when you place _fileUpload_ in the ajax rendered
_outputPanel_ just like this:
{code}
<a4j:outputPanel ajaxRendered="true">
<rich:fileUpload listener="#{listener}"/>
</a4j:outputPanel>
{code}
and you will upload a file, then the components list of uploaded/toBeUploaded files
disappears after each upload (doesn't matter which backing bean is used). [~bleathem]
is this an intention? Or should we file an issue?
FileUploadEvent listener reset the list value with Viewscope
------------------------------------------------------------
Key: RF-13323
URL:
https://issues.jboss.org/browse/RF-13323
Project: RichFaces
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: component-input
Affects Versions: 4.3.4
Environment: Jboss 7.1
Richfaces 4.3.4
JSF 2.1.9
Reporter: Mohammad Weshah
Assignee: Jiří Štefek
Labels: rich:fileUpload
Attachments: RF-13323-SessionScoped.png, RF-13323-ViewScoped.png, RF-13323.zip
Hello All,
i make an example of upload file from richfaces showcase it is working successfully , but
i notice if i changed the backing bean to viewscope the files list inside the
FileUploadEvent listener will be rest every time that i upload new file , the code as
follow :
{code}
protected List<UploadedImage> files = new ArrayList<UploadedImage>();
public void FileUploadlistener(FileUploadEvent event) throws Exception {
UploadedFile item = event.getUploadedFile();
UploadedImage file = new UploadedImage();
file.setLength(item.getData().length);
file.setName(item.getName());
file.setData(item.getData());
files.add(file);
}
{code}
but when i changed the scope to session the files still contain the old files, is it
mandatory to the backing be session or there is something wrong ?
Regards
Wish79
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira