4 Replies Latest reply on Dec 18, 2008 6:59 PM by joblini

    Creating new components

    charlscross

      Hello! Is there any way for creating a new component instance of a conversation Bean everytime a method is called?? I want to have different instances becouse of multiwindow.

        • 1. Re: Creating new components
          charlscross

          Or is possible to control this with conversations??

          • 2. Re: Creating new components
            joblini

            Try using @Begin, I think you will need to specify "nested=true"

            • 3. Re: Creating new components
              charlscross

              Well, I'm doing this exactly. The first time I call the nested conversation(popup window,nested=true) a new instance of the conversation bean is created. Then if I open the main frame with join=true another instance is created. But if I open a new popup window no new instance is created, the new popup window works with the second instance(main frame), so when the new popup window is refreshed gets the data from the main frame instead of itself.


              Thanks!!

              • 4. Re: Creating new components
                joblini

                OK, sorry, I misunderstood what you are trying to do.


                You need to ensure that you are not passing the cid in the url when you open the popup window.  Seam checks for the cid request parameter, if it exists, the conversation is restored, otherwise, a new conversation is started.  Are you using s:link or s:commandbutton to open the popup?  These tags have a propogation attribute that may be helpful.  Otherwise, just a plain html link should do the trick, as the cid will not be automatically propogated in the request.