1 2 Previous Next 21 Replies Latest reply on Nov 8, 2007 5:51 PM by gus888 Go to original post
      • 15. Re: Why cannot I run more than one concurrent conversation S
        gus888

        Hi Pete,

        I don't know whether you can a functionality to Seam conversation Manager.java: as long as a user start @Begin, system will add propagation=none to the current/active conversation, then system will start a new current/active conversation. If you like, I can create JIRA. Thank you very much.

        • 16. Re: Why cannot I run more than one concurrent conversation S
          pmuir

          The propagation="none" is done on the view *before* the @Begin is encountered so we don't know whether it is coming up ...

          • 17. Re: Why cannot I run more than one concurrent conversation S
            gus888

            Hi Pete,

            How about, as long as system get @Begin, system will start a new front conversation, and set other conversation back to time-off. If @Begin with a Id, system will check existing conversatin list, if found, system retrieve it, otherwise system create a new conversation. Can you think about the idea? Really appreciate it.

            • 18. Re: Why cannot I run more than one concurrent conversation S
              pmuir

              I think the conversation model is unlikely to be redesigned like this in Seam - it's a fundamental design change.

              • 19. Re: Why cannot I run more than one concurrent conversation S
                gus888

                Hi Pete,

                Thanks for your reply. Now I have not fully understood the Seam conversation strategy, but I think that if you remove the

                begin method invoked from a long running conversation, try using @Begin(join=true)
                exception check from new conversation @Begin invoke, maybe this issue will be resolved. A new conversation started and the previous front would be put back.

                I think that the propagate="none" is hard to use in production, since the non-cooperative user determine when he/she stop propagating in a conversation, then click other links. If put propagate="none" to the links which he/she may clicks, it seems that all links needs a propagate="none". It is very hard. Thanks for considering this issue.

                • 20. Re: Why cannot I run more than one concurrent conversation S
                  pmuir

                  I don't think it is hard to get right, I've had no problem in apps I've seen when consulting or written prior to working for JBoss.

                  Yes, you may well find that most links are propagation="none" - if your user navigates away from his current workspace/task then you are likely to want to not propagate the conversation.

                  Now, if you actually posted a solid use case for your problem, perhaps we can help you...

                  • 21. Re: Why cannot I run more than one concurrent conversation S
                    gus888

                    Hi Pete,

                    Thank you so much for your patiently responding my questions. In fact, I have an idea to use conversation browse bean. User can browsing the search results, then he/she can either create a new instance or edit an existing instance through another conversation bean from the browsing page. After he/she finishes, the user can go back the previous conversation browse bean. However, I couldn't get it work. The codes are as following. Thank you very much in advance.
                    StudyBrowserAction.java

                    @Stateful
                    @Name("studyBrowser")
                    @Scope(ScopeType.CONVERSATION)
                    public class StudyBrowserAction implements StudyBrowser {
                     ...
                    
                     @Begin (id="browing-study")
                     public void find() {
                     page = 0;
                     queryStudy();
                     }
                    
                     @Begin(join=true)
                     public void nextPage() {
                     page++;
                     queryStudy();
                     }
                    
                     @Begin(join=true)
                     public void previousPage() {
                     page--;
                     queryStudy();
                     }
                    
                     private void queryStudy() {
                     ...
                     }
                    
                     @Remove
                     public void destroy() {}
                    }
                    

                    StudyEditorAction.java
                    @Stateful
                    @Name("studyEditor")
                    @Scope(ScopeType.CONVERSATION)
                    public class StudyEditorAction implements StudyEditor {
                    
                     @Begin(id="create-study"
                     public String createStudy() {
                     ...
                     }
                    
                     @Begin(id="edit#{study.id}")
                     public void editStudy() {
                     ...
                     }
                    
                     @Begin(join=true)
                     public void create() {
                     ...
                     }
                    
                     @Begin(join=true)
                     public void update() {
                     ...
                     }
                    
                     @End
                     public void done() {
                     ...
                     }
                    
                     @End
                     public void cancel() {}
                    
                     @Remove
                     public void destroy() {}
                    }

                    xhtml page:
                    <h:selectInputText id="studyBrowsing" />
                    <h:commandButton id="findStudy" value="Browse Study" action="#{studyBrowser.find}" />
                    
                    <h:commandLink value="Create New Study" action="#{studyEditor.createInstance}"/>
                    
                    
                    <h:dataTable id="studies" value="#{studies}" var="study" >
                     ...
                     <h:column>
                     <f:facet name="header">Action</f:facet>
                     <ice:commandLink value="Edit Study" action="#{studyEditor.editStudy}"/>
                     </h:column>
                    </h:dataTable>
                    
                    <h:commandLink value="Next Page" action="#{studyBrowser.nextPage}"/>
                    <h:commandLink value="Previous Page" action="#{studyBrowser.previousPage}"/>


                    1 2 Previous Next