How do I use a managed bean in another managed bean
I have two managed beans. One is backing bean for a form and the other is used to access a database table.
1st bean
public class TestDBAO
{
@PersistenceContext
private EntityManager em;
public void addEntry(PersonObj person)
{
em.persist(person);
}
}
public class formdata
{
private String id;
private String fname;
private String lname;
getter functions
setter functions
public String submit()
{
in here i want to call addEntry function from TestDBAO
}
}
How can I achieve this or is there another way to do this?

