[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-834) FileUpload (Progress bar cannot with this be used as it does not seem to pass on the Conversation)

Gregory Dick (JIRA) jira-events at lists.jboss.org
Wed Mar 14 15:52:37 EDT 2007

    [ http://jira.jboss.com/jira/browse/JBSEAM-834?page=comments#action_12356137 ] 
Gregory Dick commented on JBSEAM-834:

This case is to capture progress on the FileUpload problem. 

Some terms:

FileUploadServlet: Servlet handling FileUpload post requests 
InputBean: Stateful Seam component holding the file upload state
FileUploadComponent: ICEfaces component rendering the progress of the file upload, as well as name state. 

The original problem occured when attempting a FileUpload. The root cause was that the FileUpload Servlet was calling the InputBean to update the progress state variables. Seam intercepts these method calls, and upon return, was trying to clean up contexts that had not been setup, which was the cause of the original exceptions. 

So we annotated interception Never onto the InputBean, so Seam wouldn't intercept these invocations. This makes the exceptions go away, and allows the file to be uploaded correctly to the server. 

The original idea behind server push render was to have the InputBean call execute() and render(), which should drive the update of the progress bar on the client. The first problem in the new regime is a simple problem with concurrent access. If the Backing Bean causes a render pass from inside one of its methods, and it's going to be queried as to state by a component, the EJB model wont let that happen. 

You can get around this by using the EL to allow the InputBean to pass back a progress listener object, which is then notified of the progress, updates the state bean, and then calls execute() and render() from its method. This allows the component to query the InputFile properties in a separate object. 


where the progress monitor method on the inputFile named component returns an object that has a progress(EventObject) method in it. 

So that works. In digging into the FileUploadServlet, I see that the FileUploadServlet is calling execute() and render() already. So, likely, the one that's in the class that implements progress (not the InputFile bean, but the object returned by it) is not necessary. 

However, neither of these sources of rendering cause the rendered page to be updated. 
There is something wrong with the view Number field, or something wrong with the response state. Looking into that part now. 

> FileUpload (Progress bar cannot with this be used as it does not seem to pass on the Conversation)
> --------------------------------------------------------------------------------------------------
>                 Key: JBSEAM-834
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-834
>             Project: JBoss Seam
>          Issue Type: Bug
>          Components: ICE Faces Integration
>    Affects Versions: 1.1.6.GA
>            Reporter: Tony Herstell
>         Assigned To: Gregory Dick
>            Priority: Minor
> Don't use the progressListener
>  <!-- progressListener="#{uploadController.progress}" -->
> as it throws a "no long running conversation" exception in seam in the backing bean.
> <ice:panelGrid columns="1">
> 	<ice:inputFile style="border:none; width:400px; height:70px;"
>                      actionListener="#{uploadController.action}"/> <!-- progressListener="#{uploadController.progress}" -->
>          <ice:outputProgress id="progress" value="#{uploadController.percent}"/>
> </ice:panelGrid>

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the seam-issues mailing list