0 Replies Latest reply on Dec 7, 2005 8:05 AM by littlesuns

    share conversation with javabean

    littlesuns

      there are two javabeans :actionbeanA and actionbeanB,like that:

      //actionbeanA
      @Name("actionA")
      @Scope(scopeType.conversation)
      public class ActionA(){

      @Begin
      public String start(){
      ActionB b=Contexts.getInstance("actionB",true);
      b.start();
      return "main";
      }
      public void findActionB(){
      ActionB b=Contexts.getConversationContexts().get("actionB");
      assert b!=null;
      }
      }

      //actionbeanB
      @Name("actionB")
      @Scope(scopeType.conversation)
      public class ActionB(){

      @Begin
      public String start(){
      ActionA a=Contexts.getConversationContexts().get("actionA");
      assert a!=null;
      return "main";
      }
      }

      in the pages,we invoke the actionA.start() first,then actionA.findActionB(),but the variable b in findActionB() is null,why?I think the two beans share the same current conversation,aren't they?