I'm creating two beans, make inject first bean to second bean. Second bean make set method for first bean. Also second bean bean called from JSF.
I need to container create one instance for access from second bean and JSF page.
Result page not include data from first bean, that has been set from second bean.
I think container create two instance. But why?
Thanks.
Code:
### first bean@ManagedBean(name="a")
@Stateful
class A{
private String thing;
public String getThing();
public String setThing();
}
### second bean
@ManagedBean(name="b")
@SessionScoped
@Stateful
class B{
@Inject
private A a;
a.setThing();
}
### JSF page
<p:outputLabel value="#{a.thing}" />