I am a beginner in JSF and thank you for helping me. I have 2 Managed Beans A and B. I would simply like to recover 2 variables from the A bean to the B bean. Is there a solution? I try for hours things found on the internet but nothing works! PLEASE could you give me a start of solution?
I tried (but causes a null pointer):
import javax.enterprise.context.SessionScoped;
import javax.inject.Named;
@SessionScoped
@Named
public class AccueilManagerBean implements Serializable {
...
...
import javax.enterprise.context.SessionScoped;
import javax.inject.Named;
@SessionScoped
@Named
public class NoteManagerBean implements Serializable {
@ManagedProperty(value = "#{accueilManagerBean}")
private AccueilManagerBean acm;
public NoteManagerBean() {
}
@PostConstruct
public void init() { System.out.println(acm.getPageHauteur());
}