how can i use a bean inside other bean ?
I use this solution, what’s the best way ?
@ManagedBean(name="firstBean")
public class FirstBean implements Serializable{
@ManagedProperty(value="#{myBean}")
private MyBean myBean;
...
//(get/set method)
}
I’m new in JSF and JSP so probably it’s a bad practies.
Your solution is the right one to inject another bean.
You only need the setter for the injected bean.
Are you having any issues\errors with it?