Hi All,
I need some help with JSF selectonemenu used along with Hibernate.
I was trying an example of populating a selectonemenu from a database table. The database has two tables, one with students, and other with their advisors. The student table has advisors as a foregin key. I am populating my JSF page with list of advisors from the advisor table. When an advisor value is selected, the appropriate ID of the advisor selected should be set in the students table. I am able to retrieve the values but cannot save the related ID in the students table. Can anyone please explain me on how to get the ID of the selected value from one table and save it in another table.
Thank you,
lavanya.
|