Using @ManagedBean
, you cannot inject beans with smaller scope into beans with bigger scope. For your case, inject the @SessionScoped
into the @RequestScoped
. Then you can update any properties of the @SessionScoped
from the @RequestScoped
bean.
Regarding your update, in the 2nd bean, you cannot get tAgency
from a getter like that. The following function would do the job.
@PostConstruct
public void init() {
tAgency = agencyBean.gettAgency();
}