In the head, there were various issues with the Seam example applications. The JSF lifecycle was not quite as it was supposed to be, and the Context objects that Seam uses to hold application state were incorrectly terminated. It turns out that the mechanisms in place to clear out these contexts were not preserved correctly, and that things were wrong.
The D2DViewHandler code just keeps the viewRoot in the FacesContext. This is likely wrong, as it subverts state management, but so it goes. The D2DViewHandler needs to know if the current request is a faces or non-faces request for the sake of properly creating a viewRoot as suggested in the JSF spec.
We used to set a flag in the persistentFacesServlet to inform the D2DViewHandler that the view should not be restored, since a new one should be created, but that code didn't work in the new environment. This has now been fixed.
Also the EventContext was not being cleared properly because the code to do that in renderResponse in the D2DViewHandler was overridden by the FaceletsViewHandler. Not sure when this changed, but I moved the code to the renderView method, which should be common to all.
Sending ServletExternalContext.java
Committed revision 13356.
Sending ServletView.java
Committed revision 13355.
Sending D2DViewHandler.java
Committed revision 13357.
In the head, there were various issues with the Seam example applications. The JSF lifecycle was not quite as it was supposed to be, and the Context objects that Seam uses to hold application state were incorrectly terminated. It turns out that the mechanisms in place to clear out these contexts were not preserved correctly, and that things were wrong.
The D2DViewHandler code just keeps the viewRoot in the FacesContext. This is likely wrong, as it subverts state management, but so it goes. The D2DViewHandler needs to know if the current request is a faces or non-faces request for the sake of properly creating a viewRoot as suggested in the JSF spec.
We used to set a flag in the persistentFacesServlet to inform the D2DViewHandler that the view should not be restored, since a new one should be created, but that code didn't work in the new environment. This has now been fixed.
Also the EventContext was not being cleared properly because the code to do that in renderResponse in the D2DViewHandler was overridden by the FaceletsViewHandler. Not sure when this changed, but I moved the code to the renderView method, which should be common to all.
Sending ServletExternalContext.java
Committed revision 13356.
Sending ServletView.java
Committed revision 13355.
Sending D2DViewHandler.java
Committed revision 13357.