[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-826) Ajax push throws IllegalStateException

Ted Goddard (JIRA) jira-events at lists.jboss.org
Thu Feb 15 12:57:37 EST 2007


    [ http://jira.jboss.com/jira/browse/JBSEAM-826?page=comments#action_12353244 ] 
            
Ted Goddard commented on JBSEAM-826:
------------------------------------

As we determined at the Atlanta meeting, Ajax Push with Seam requires both JSF execute() and render() invocations.

We are evaluating the following candidate fix for ICEfaces:

Index: core/src/com/icesoft/faces/webapp/xmlhttp/PersistentFacesState.java
===================================================================
--- core/src/com/icesoft/faces/webapp/xmlhttp/PersistentFacesState.java (revision 13265)
+++ core/src/com/icesoft/faces/webapp/xmlhttp/PersistentFacesState.java (working copy)
@@ -291,10 +291,11 @@
     }
 
     /**
-     * execute and Render the view associated with this <code>PersistentFacesState</code>.
-     * The user's browser will be immediately updated with any changes.
+     * Execute  the view associated with this <code>PersistentFacesState</code>.
+     * This is typically followed immediatly by a call to 
+     * {@link PersistentFacesState#render}.
      */
-    void execute() throws RenderingException {
+    public void execute() throws RenderingException {
         if (isBridgeFacesContext) {
             ((BridgeFacesContext) facesContext).setCurrentInstance();
             String viewNumber = ((BridgeFacesContext) facesContext)
@@ -303,8 +304,6 @@
             synchronized (bContext) {
                 try {
                     lifecycle.execute(facesContext);
-                    lifecycle.render(facesContext);
-                    bContext.release();
                 } catch (IllegalStateException e) {
                     if (log.isDebugEnabled()) {
                         log.debug("fatal render failure for viewNumber "
Index: core/src/com/icesoft/faces/webapp/xmlhttp/FileUploadServlet.java
===================================================================
--- core/src/com/icesoft/faces/webapp/xmlhttp/FileUploadServlet.java    (revision 13265)
+++ core/src/com/icesoft/faces/webapp/xmlhttp/FileUploadServlet.java    (working copy)
@@ -83,6 +83,7 @@
         if (state != null) {
             try {
                 state.execute();
+                state.render();
             } catch (RenderingException e) {
                 if (log.isDebugEnabled()) {
                     log.debug(e.getMessage());




> Ajax push throws IllegalStateException
> --------------------------------------
>
>                 Key: JBSEAM-826
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-826
>             Project: JBoss Seam
>          Issue Type: Bug
>          Components: ICE Faces Integration
>         Environment: Seam + ICEfaces
>            Reporter: Gregory Dick
>         Assigned To: Gregory Dick
>
> Server initiated rendering causes an application error similar to the following
> java.lang.IllegalStateException: No active application scope
>  	at org.jboss.seam.core.Init.instance(Init.java:75)
>  	at org.jboss.seam.jsf.TransactionalSeamPhaseListener.handleTransactionsBeforePhase(TransactionalSeamPhaseListener.java:25)
>  	at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:43)
>  	at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersBefore(PhaseListenerManager.java:70)
>  	at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:373)
>  	at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.render(PersistentFacesState.java:180)
>  	at com.icesoft.faces.async.render.RunnableRender.run(RunnableRender.java:89)
>  	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:643)
>  	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:668)
>  	at java.lang.Thread.run(Thread.java:595)

-- 
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