Hi All,
Say I have 2 java beans.
EmployeeBean.java( 3 properties with getters and setters)
-------------------
empId
empLoginName
empPassword
EmployeeDetailBean.java ( 3 properties with getters and setters)
-------------------------
empId
empFirstName
empSecondName
And I have 2 jsp pages(empLogin.jsp,empDetail.jsp)
User will enter Login & password in empLogin.jsp page and it will have a method will check user credentials and it will return empId in case of success.
When user login & password is correct I'd like to send this empId to empDetail.jsp page and I'd like to query employeedetail table based on empId and show employee details on empDetail.jsp page.
Please let me know how to do these tasks for above situation:
1. How to pass empId between the pages. ( EmployeeBean.java bean is in session scope).
2. In empLogin.jsp, I have submit button where I'm calling checkUser() method for validating empLoginName and password, in this method I'm calling antother method selectEmployeeDetail(which will retrive data for given empId) in EmployeeDetailBean.java, this method is invoking fine but the data is not showing up in empDetail.jsp page.
3. In dataTable tag, we can invoke a method from java bean to populate data but how to do similar in <h:form> tag.
Thanks in advance.
Regards,
Sharath.