2 Replies Latest reply on Oct 12, 2007 2:35 AM by Tomasz ?liwa

    seam remoting problem

    Tomasz ?liwa Newbie

      hi, I'm trying to invoke method from bean in CONVERSATION scope, and I'm getting error (NullPointerException in save() because userType is null ).
      it happens because seam creates a new instance of my conversationController component instead of using existing one.
      in javascript I'm invoking Seam.Component.getInstance("conversationController").save(saveAndCloseCallback);
      when I set bean's scope to SESSION everything works fine except that it has to be CONVERSATION scope :(
      is there any way to force seam remoting to use existing instance of my conversationController instead of creating new one ?

      @Name("conversationController")
      @Scope(ScopeType.CONVERSATION)
      @Stateful
      public class ConversationControllerAction implements ConversationController {
      ...
      private String userType;
      ...
      otherMethod(){
      setUserType="I";
      }
      ....
      @WebRemote
      public boolean save() {
      if (userType.equals("I")) {...}
      }