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
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
= 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
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
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
- 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
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
.
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
= 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
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
/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
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
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
13 matches
Mail list logo