I have a managed property inside a view scoped managed bean like this:
where the LoginUser is a session scoped managed bean.
But the loginUser is always null! Why?
When I use the same syntax with request scoped or session scoped beans
JSF injects automatically the loginUser where I want. So for example this
does work:
In addition I know that the loginUser is not actually null since I can access it from the ViewScoped bean with this code
I do not see where the problem is. ViewScoped is considered to be between RequestScoped and SessionScoped so it should not be a "visibility" problem (I mean that for example SessionScoped managed bean can not use RequestScoped managed property since the property is changed in every request).
I'm using MyFaces 2.0.1 so maybe there is a bug in MyFaces? Any thoughts?