You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Moreno Cornaz <yo...@gmail.com> on 2008/09/09 19:27:49 UTC

orchestra conversation

Hello everybody.
>
> I'm using my-faces-orchestra 1.1 library with Tomcat 6.0, spring 2.0,
> myfaces 1.1.5 and I'm facing the following problem:
>
> - I define a bean with scope 'conversation.access'. When, from a window I
> open a new popup window, I lose the bean in the new window (that is, the
> bean is recreated). This happens only if the new window is popped up! Of
> course, if I set the bean scope to 'session' it works. Is there any
> solution?

Thank you..

Re: orchestra conversation

Posted by Moreno Cornaz <yo...@gmail.com>.
Hello.
I can get it through Spring and I thought that if orchestra should have
deleted the bean, if I get it again
its field should be null. This doesn't happen, but only because when I open
the new page the bean it's still
alive during the request. If from the new one I open another page the bean
it's deleted.
So i think it works, and it was my mistake... sorry.


2008/10/9 Simon Kitching <sk...@apache.org>

> On Tue, 2008-10-07 at 18:33 +0200, Moreno Cornaz wrote:
> > Hello Simon.
> > I tried your tip and it seems to work fine. I'm sorry to thank you so
> > late... but thanks anyway
> >
> > I still have one problem with orchestra.
> > I have a bean with 'conversation.access' that is accessed in a page.
> > When I leave the page the conversation of that bean is not deleted! in
> > the new page I have no reference to that bean, and that bean is the
> > only one in the conversation.
>
> If you have no references to it, how do you know it was not deleted?
>
>
>

Re: orchestra conversation

Posted by Simon Kitching <sk...@apache.org>.
On Tue, 2008-10-07 at 18:33 +0200, Moreno Cornaz wrote:
> Hello Simon. 
> I tried your tip and it seems to work fine. I'm sorry to thank you so
> late... but thanks anyway
> 
> I still have one problem with orchestra.
> I have a bean with 'conversation.access' that is accessed in a page.
> When I leave the page the conversation of that bean is not deleted! in
> the new page I have no reference to that bean, and that bean is the
> only one in the conversation.

If you have no references to it, how do you know it was not deleted?



Re: orchestra conversation

Posted by Moreno Cornaz <yo...@gmail.com>.
Hello Simon.
I tried your tip and it seems to work fine. I'm sorry to thank you so
late... but thanks anyway

I still have one problem with orchestra.
I have a bean with 'conversation.access' that is accessed in a page. When I
leave the page the conversation of that bean is not deleted! in the new page
I have no reference to that bean, and that bean is the only one in the
conversation.

Regards and thanks.



2008/9/14 Simon Kitching <sk...@apache.org>

> Hi Moreno,
>
> On Tue, 2008-09-09 at 19:27 +0200, Moreno Cornaz wrote:
> > Hello everybody.
> > >
> > > I'm using my-faces-orchestra 1.1 library with Tomcat 6.0, spring
> > 2.0,
> > > myfaces 1.1.5 and I'm facing the following problem:
> > >
> > > - I define a bean with scope 'conversation.access'. When, from a
> > window I
> > > open a new popup window, I lose the bean in the new window (that is,
> > the
> > > bean is recreated). This happens only if the new window is popped
> > up! Of
> > > course, if I set the bean scope to 'session' it works. Is there any
> > > solution?
> >
> > Thank you..
> >
>
> Sorry it took so long to answer. When you open a new window, if the new
> url does not contain the "conversationContext" query parameter from the
> original window then it will get new copies of conversation-scoped beans
> rather than seeing the ones associated with the original window. This
> behaviour is normally what is wanted.
>
> If the popup window is "modal", then simply ensure the query param is in
> the new url and the existing beans should be accessable fine.
>
> If the new window is not modal, then I suggest you think carefully.
> Having two windows that see the same beans is dangerous; you have to
> handle all sorts of odd conditions. Which is why "sharing" beans between
> windows is not the default.
>
> Regards,
> Simon
>
>

Re: orchestra conversation

Posted by Simon Kitching <sk...@apache.org>.
Hi Moreno,

On Tue, 2008-09-09 at 19:27 +0200, Moreno Cornaz wrote:
> Hello everybody.
> >
> > I'm using my-faces-orchestra 1.1 library with Tomcat 6.0, spring
> 2.0,
> > myfaces 1.1.5 and I'm facing the following problem:
> >
> > - I define a bean with scope 'conversation.access'. When, from a
> window I
> > open a new popup window, I lose the bean in the new window (that is,
> the
> > bean is recreated). This happens only if the new window is popped
> up! Of
> > course, if I set the bean scope to 'session' it works. Is there any
> > solution?
> 
> Thank you..
> 

Sorry it took so long to answer. When you open a new window, if the new
url does not contain the "conversationContext" query parameter from the
original window then it will get new copies of conversation-scoped beans
rather than seeing the ones associated with the original window. This
behaviour is normally what is wanted.

If the popup window is "modal", then simply ensure the query param is in
the new url and the existing beans should be accessable fine.

If the new window is not modal, then I suggest you think carefully.
Having two windows that see the same beans is dangerous; you have to
handle all sorts of odd conditions. Which is why "sharing" beans between
windows is not the default.

Regards,
Simon