webtier@glassfish.java.net

jsf 2.0 reference to other bean

From: <webtier_at_javadesktop.org>
Date: Thu, 02 Jul 2009 05:42:37 PDT

Hi,

I have jsf 2.0 managed bean called UserBean. It has the annotation SessionScoped.
I want to refrerence this bean from another RequestScoped bean.

I have added the UserBean property to the other bean like this.

private UserBean userBean.

When i want to access this bean in a @PostConstruct method, userBean is null.
Why is that? UserBean is already created.

Thanks
[Message sent by forum member 'gabox01' (gabox01)]

http://forums.java.net/jive/thread.jspa?messageID=353905