On 11/25/05, Craig McClanahan <[EMAIL PROTECTED]> wrote: > On 11/25/05, Wendy Smoak <[EMAIL PROTECTED]> wrote: > > > > On 11/25/05, Craig McClanahan <[EMAIL PROTECTED]> wrote: > > > > > How do *you* know that it's a session scoped bean > > > (versus perhaps being in some other scope)? > > > > Because I put it there. The question first came up when I put my > > usual authentication Filter (which puts a 'user' bean in session > > scope) in front of a webapp, and then wandered around the JSF API for > > a while trying to figure out how on earth to get it back. > > > True in this specific case -- but that's an arbitrary restriction in the > general case. Sort of the same argument as for using dependency injection > frameworks in the first place ... lazy instantiation may not be what you > want for a "logged in user" bean, but it is generally quite useful.
I'm still not sure about this one. That Filter has to be there, and I have to be able to find that 'user' bean later. If 'getBean' is the recommended way to retrieve beans in a ViewController... what happens if I go ahead and declare the 'user' as a session scoped managed bean, knowing that the Filter will put it in session scope? As far as I can tell, the framework should "notice" that the user bean is already there, and not try to create one. (If the app is ever in a state where the user bean is *not* in session scope, things have gone horribly wrong.) Or would you do this some other way? Thanks, -- Wendy --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]