I am using RichFaces 3.3 and Seam 2 to develop a web application.
I have a page with the following:
<h:form>
<s:div id="myPanel">
<h:messages/>
<rich:fileUpload fileUploadListener="#{service.uploadEvent}" maxFilesQuantity="1">
<a:support event="onuploadcomplete" reRender="myPanel"/>
</rich:fileUpload>
</s:div>
</h:form>
In the service.uploadEvent
method, I receive the file and add a FacesMessage to let the user know the file uploaded succesfully.
What actually happens is this:
service.fileUpload()
. This method adds a FacesMessage
to the Conversation-scoped FacesMessages
seam component.FacesMessage
s.FacesMessages
for conversation #3<h:messages/>
) and kills conversation #3I can solve this in a number of ways:
service.fileUpload()
and ending it upon doing fileUploadComplete()
.The proper way would be to reRender the page in the same conversation as service.fileUpload()
. Is this possible?
This can only be solved by using a custom StatusMessages component and scoping it to a context which will still be available on Rerender (e.g. PAGE or longrunning CONVERSATION).