1 Reply Latest reply on Jun 21, 2009 1:14 PM by niox.nikospara.yahoo.com

    Storing Items in a Conversation

    oyesiji77

      Normally to obtain a conversation in my bean  I inject it


           


      @In Conversation conversation;





      Now my question is , is there a way i can store something in this conversation like we do with Session

        • 1. Re: Storing Items in a Conversation
          niox.nikospara.yahoo.com

          Is there any particular reason why to inject the Conversation itself and not use it as recommended:


          @Name("foo")
          @Scope(ScopeType.CONVERSATION)
          class Foo {
            @Out
            YourBean yourBean;
          }
          
          // OR
          
          @Name("bar")
          class Bar {
            @Out(scope=ScopeType.CONVERSATION)
            YourBean yourBean;
          }
          



          There are more details in Chapter 4 of the docs and in the examples.


          If however you insist on using the conversation programmatically, check out the class org.jboss.seam.contexts.Contexts and the interface org.jboss.seam.contexts.Context.