4 Replies Latest reply on Aug 30, 2006 9:39 PM by Gavin King

    How to use conversationPropagation=

    Stas Garifulin Newbie

      During an conversation i would like to create new conversations (not nested) with custom conversationIds. I added next code to my page:

      <h:commandLink action="#{actionBean.show}" rendered="#{!entity.available}" value="X">
       <s:conversationPropagation type="none" />
       <f:param name="name" value="#{entity.name}" />
      </h:commandLink>
      


      But it doesn't work as i expected: then i click this link i stay at same page: it doesn't contain info from old conversation (conversation propagation is really suppressed) and facesMessages input cantains "No conversation". During submit my custom action does not take control. If i remove <s:conversationPropagation> i get exception, because "actionBean.show" is annotated with @Begin.

      What i want: i have conversations which contain different permutations of same entities. I takes much time to retrieve detailed info about these entities. I would like save obtained info in conversations with custom Ids, so Seam could optimize access to info already stored in memory.




        • 1. Re: How to use conversationPropagation=
          Gavin King Master

          This is a bug, I believe - I fixed it in CVS. Please try out my fix, TIA!

          • 2. Re: How to use conversationPropagation=
            Benjamin Heitmann Newbie

            Well this sounds so incredibly much like a really annoying bug I am having right now....

            Sadly, the current state of Seam CVS seems to be pretty unstable.
            After pulling it from CVS, running ant with the default target, und copying the three resulting jars together with all jars from lib to a project generated with SeamGen, then ant deploy in that project... That string of events generates one of the longest stack traces, which I have seen in a while, if I attempt to run it.

            (For clarity, I genereated a new-scaffold with a current SeamGen, and the copied the mentioned libraries to the lib folder, after deleting the old ones.)

            If you want I can post the stack trace, but I am pretty sure, Seam CVS is just that right now: not stable.

            But, if by fix, you mean the 3 changed lines in jboss-seam/src/*/Manager.java, then I am going to attempt a backport of the fix.

            I really am wondering why this glaring bug was not found earlier. BTW, when is the next minor bug fixing release of Seam ? :)

            • 3. Re: How to use conversationPropagation=
              Stas Garifulin Newbie

              Came here as soon as i checked cvs log :)

              Looks like conversationPropagation="none" works fine now. Just one note! My original code (look at my first post) didn't work: 'entity' is conversational component and it was unavailable in postback because of disabled propagation. <s:link> works fine in this situation.

              And, Gavin, your recent changes in Manager.java broke workspace management:

               <h:dataTable value="#{conversationList}" var="entry">
               <h:column>
               <h:commandLink action="#{entry.select}" value="#{entry.description}"/>
              
               <h:outputText value="[current]" rendered="#{entry.current}"/>
               </h:column>
               </h:dataTable>
              


              ERROR 31-08 02:17:08,875 (Log4JLogger.java:error:119) -Servlet.service() for servlet Faces Servlet threw exception
              javax.faces.FacesException: #{entry.select}: javax.faces.el.EvaluationException: /template.xhtml @46,80 action="#{entry.select}": java.lang.NullPointerException
               at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:98)
               at javax.faces.component.UICommand.broadcast(UICommand.java:332)
               at javax.faces.component.UIData.broadcast(UIData.java:677)
               at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:287)
               at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:401)
               at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
               at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
               at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
               at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
               at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
               at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:59)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
               at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
               at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
               at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
               at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
               at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
               at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
               at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
               at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
               at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
               at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
               at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
               at java.lang.Thread.run(Unknown Source)
              Caused by: javax.faces.el.EvaluationException: /template.xhtml @46,80 action="#{entry.select}": java.lang.NullPointerException
               at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:73)
               at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
               ... 28 more
              Caused by: java.lang.NullPointerException
               at org.jboss.seam.core.Manager.encodeParameters(Manager.java:864)
               at org.jboss.seam.core.Manager.redirect(Manager.java:912)
               at org.jboss.seam.core.Manager.redirect(Manager.java:841)
               at org.jboss.seam.core.ConversationEntry.select(ConversationEntry.java:175)
               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
               at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
               at java.lang.reflect.Method.invoke(Unknown Source)
               at com.sun.el.parser.AstValue.invoke(AstValue.java:151)
               at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
               at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
               at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
               ... 29 more
              


              • 4. Re: How to use conversationPropagation=
                Gavin King Master

                Sorry, I accidently committed part of another change at the same time.

                Fixed now.