Re: @ViewAccessScoped PreDestroy

2011-06-24 Thread Marcus Büttner
Hi Pieter, the behavior which you describe is provided by ViewScope. If you navigate to a different view the old bean is destroyed. Regards Marcus 2011/6/23 Pieter Martin pieter.mar...@gmail.com Hi, I trying to use @ViewAccessScoped beans but am not getting the expected behavior. I

Re: @ViewAccessScoped PreDestroy

2011-06-24 Thread Pieter Martin
Thanks, I'll give it a both scenarios a test/try tonight. Pieter On 24/06/2011 08:55, Marcus Büttner wrote: Hi Pieter, the behavior which you describe is provided by ViewScope. If you navigate to a different view the old bean is destroyed. Regards Marcus 2011/6/23 Pieter

Re: @ViewAccessScoped PreDestroy

2011-06-24 Thread Pieter Martin
= helloWorld.xhtml which references the WindowScoped HelloWorldController page2 = testViewAccessScoped.xhtml which references a ViewAccessScoped bean - PostConstruct called page1 = helloWorld.xhtml, ViewAccessScoped - PreDestroy not called, as expected page1, again = helloWorld.xhtml

Re: @ViewAccessScoped PreDestroy

2011-06-24 Thread Gerhard Petracek
the WindowScoped HelloWorldController page2 = testViewAccessScoped.xhtml which references a ViewAccessScoped bean - PostConstruct called page1 = helloWorld.xhtml, ViewAccessScoped - PreDestroy not called, as expected page1, again = helloWorld.xhtml, ViewAccessScoped - PreDestroy not called

Re: @ViewAccessScoped PreDestroy

2011-06-24 Thread Pieter Martin
the WindowScoped HelloWorldController page2 = testViewAccessScoped.xhtml which references a ViewAccessScoped bean - PostConstruct called page1 = helloWorld.xhtml, ViewAccessScoped - PreDestroy not called, as expected page1, again = helloWorld.xhtml, ViewAccessScoped - PreDestroy not called

Re: @ViewAccessScoped PreDestroy

2011-06-24 Thread Gerhard Petracek
- PreDestroy not called, as expected page1, again = helloWorld.xhtml, ViewAccessScoped - PreDestroy not called, expected it to be called page3 = helloWorld2.xhtml which references the WindowScoped HelloWorldController - PreDestroy not called, expected it to be called page4 = testViewAccessScoped2

Re: @ViewAccessScoped PreDestroy

2011-06-24 Thread Gerhard Petracek
called page1 = helloWorld.xhtml, ViewAccessScoped - PreDestroy not called, as expected page1, again = helloWorld.xhtml, ViewAccessScoped - PreDestroy not called, expected it to be called page3 = helloWorld2.xhtml which references the WindowScoped HelloWorldController - PreDestroy not called

Re: @ViewAccessScoped PreDestroy

2011-06-24 Thread Pieter Martin
. I have a META-INF/beans.xml in the src/main/resources dir. page1 = helloWorld.xhtml which references the WindowScoped HelloWorldController page2 = testViewAccessScoped.xhtml which references a ViewAccessScoped bean - PostConstruct called page1 = helloWorld.xhtml, ViewAccessScoped - PreDestroy

Re: @ViewAccessScoped PreDestroy

2011-06-24 Thread Gerhard Petracek
= testViewAccessScoped.xhtml which references a ViewAccessScoped bean - PostConstruct called page1 = helloWorld.xhtml, ViewAccessScoped - PreDestroy not called, as expected page1, again = helloWorld.xhtml, ViewAccessScoped - PreDestroy not called, expected it to be called page3 = helloWorld2

Re: @ViewAccessScoped PreDestroy

2011-06-24 Thread Mark Struberg
string juggling. LieGrue, strub --- On Fri, 6/24/11, Gerhard Petracek gerhard.petra...@gmail.com wrote: From: Gerhard Petracek gerhard.petra...@gmail.com Subject: Re: @ViewAccessScoped PreDestroy To: MyFaces Discussion users@myfaces.apache.org Date: Friday, June 24, 2011, 5:46 PM hi pieter

Re: @ViewAccessScoped PreDestroy

2011-06-24 Thread Gerhard Petracek
/11, Gerhard Petracek gerhard.petra...@gmail.com wrote: From: Gerhard Petracek gerhard.petra...@gmail.com Subject: Re: @ViewAccessScoped PreDestroy To: MyFaces Discussion users@myfaces.apache.org Date: Friday, June 24, 2011, 5:46 PM hi pieter, to avoid side-effects you should always

RE: @ViewAccessScoped PreDestroy

2011-06-23 Thread Pieter Martin
Hi, I trying to use @ViewAccessScoped beans but am not getting the expected behavior. I notice that @PreDestroy only gets called when I navigate from a page using a particular ViewAccessScoped bean to another page using a different ViewAccessScoped bean. I expected @PreDestroy to be called

Re: @ViewAccessScoped PreDestroy

2011-06-23 Thread Gerhard Petracek
hi pieter, first of all welcome @ myfaces! as long as the bean is referenced by a page - the bean will be available for the next page. after rendering the first page which doesn't use the view-access scoped bean it will be destroyed (that's independent of other beans). regards, gerhard