1 2 Previous Next 16 Replies Latest reply on Dec 9, 2005 5:35 AM by Lachezar

    Conversation start with @Factory ?

    Louis Coetzee Apprentice

      Hi all,

      I am trying to start a conversation through the @Factory tag:

      @Factory("contentLoaded")
      @Begin
      public String findAllNapContent() {
      .
      


      in this method I add stuff to the conversation context which I later access:
      Contexts.getConversationContext().set("allLanguagesMapped",allLanguagesMapped);
      


      Accoring to Gavin's initial post regarding the @Factory tag
      http://www.jboss.com/index.html?module=bb&op=viewtopic&t=72267
      the conversation is supposed to be started. Unfortunately it doesn't appear to be the case. Somewhere else I try and do the following (still in the same conversation):
      Context ctx = Contexts.getConversationContext();
      Map<String, LanguageEnum> map = (Map<String, LanguageEnum>) ctx
       .get("allLanguagesMapped");
      

      Unfortunately my ctx does not contain a value for that key (actually it is completely empty e.g. nothing associated with that conversation).

      Does the @Factory allow for the start of a conversation? If not, any suggestions as to start the conversation ?
      I am using the CVS version of Seam.

      Thanks

      Louis


        1 2 Previous Next