Details
Description
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.
<ice:inputFile
progressListener="#{inputFile.progressMonitor.progress}"
actionListener="#{inputFile.actionMonitor.action}"/>
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.
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.
<ice:inputFile
progressListener="#{inputFile.progressMonitor.progress}"
actionListener="#{inputFile.actionMonitor.action}"/>
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.
Issue Links
- blocks
-
ICE-1810 Support Integration with JBoss Seam
- Closed
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Greg Dick
created issue -
Ken Fyten
made changes -
Field | Original Value | New Value |
---|---|---|
Assignee | Greg Dick [ greg.dick ] |
Ken Fyten
made changes -
Fix Version/s | 1.6DR#2 [ 10040 ] |
Greg Dick
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Fix Version/s | 1.6 [ 10031 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
Assignee | Greg Dick [ greg.dick ] |