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?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With