1 Reply Latest reply on May 14, 2010 2:37 AM by mariusz bogucki

    ending root conversation

    mariusz bogucki Newbie

      It says that if I end root conversation it effectively destroys nested conversations. I have a situation in whitch I want end root conversation from inside a nested conversation like this





      @Scope(CONVERSATION)
      @Name("thisText")
      public class ThisTextAction implements  Text {
      
      
        @End(root = true)  
         public void saveThis() {
           //some code
              thisSaved=true;
         }
      }
      




      and in my pages.xml  I have




      <navigation>
                <rule if="#{thisText.textSaved}">
                   <redirect view-id="/someView.xhtml"/>
                </rule>
       </navigation>




      the problem is that thisText.textSaved is always false since this component is no more in conversation , so how can I do that
      I could do that using s:link and redirect just providing the view but I cant do that because I need to submit the form so I am using command button to execute method that ends root conversation



      Thanks.



        • 1. Re: ending root conversation
          mariusz bogucki Newbie

          ok I just added the end conversation  root true inside the navigation tag and it works   but I thought that I could do that with annotation and seam actualy keeps the nested conversations to do that kind of checking I guess I was wrong




          <navigation>
                     <rule if="#{thisText.textSaved}">
                           <redirect view-id="/someView.xhtml"/>
                           <end-conversation root="true" />
                      </rule>
                  </navigation>