I\'m trying to inject the value of one sessionscoped bean into a viewscoped bean but it keeps returning null, here\'s a snippet:
import javax.faces.applicati
#{user.userName} is interpreted by JSF as getUser().getUserName()
#{user.userName}
getUser().getUserName()
So it is better to have a @ManagedProperty of type User, with its getter/setter methods getUser/setUser. With that you can access the user's name by #{user.userName}.
@ManagedProperty
User
getUser
setUser