users@javaserverfaces.java.net

Re: JSF 1.2/ Facelets/ Managed Bean Scope

From: Jason Lee <jason_at_steeplesoft.com>
Date: Wed, 3 Oct 2007 09:30:14 -0500

I'm not sure I followed all of that. Can you send the relevant snippets
from your faces-config.xml and any Java code?

On 10/3/07, Butash, Bob <bob.butash_at_eds.com> wrote:
>
> I'm leveraging JSF 1.2 with Facelets and I'm running into an error.
>
> I have a backing bean the retrieves a list from the model tier of the
> application, I then try to set the list as the value of a configured managed
> bean. The managed bean is scoped to session scope however I notice that if
> I just set the managed bean without retrieving it first for some reason the
> managed bean's scope is set to request instead of session per it's
> configuration.
>
> The usecase
> 1. Leveraging JSF 1.2 and Facelets
> 2. Declare Managed Bean as session scope
> 3. Attempt to set the managed bean value without previously obtaining it
> from the managed bean creation facility
>
> With this scenario the managed bean is placed into request scope not
> session scope. If I retrieve the managed bean leveraging the managed bean
> creation facility, when I set it, it is properly set into session scope.
> However, it doesn't seem right to have a new list instantiated just so that
> I can throw it away. This did work in my JSF 1.1 application.
>
> Any help would be apprecriated.
>
> Thanks
>



-- 
Jason Lee, SCJP
Software Architect -- Objectstream, Inc.
JSF RI Dev Team
http://blogs.steeplesoft.com