Homework 11 (JSF 6-9 notes)

 

Create a JSF project that uses the table STUDENTS of database file hw11.mdb.

 

This is the table:

 

 

The data types are mainly obvious – the field ACCEPTED stores Boolean data.

 

There should be an initial JSF JSP page with a form. The form should allow a user to enter a studentID, username, GPA, email, verbal SAT score, math SAT score, and major. Don’t display the accepted field – that will be calculated. Use either a select or a set of radio buttons for the major. There should also be a command button which triggers the action.

 

Do validation of the data using any of the styles you’ve seen. The studentid must be different from every other studentid (you'll need to check this out in the database using a query). An SAT score should be between 200 and 800. A studentID should be 9 characters. A GPA should be between 0.0 and 4.0. All fields are required.

 

The action of the form should cause the action controller to calculate whether the new student is accepted (if the total SAT score is at least 1000 and the GPA is at least 3.1), and insert the new record into the database table (you'll need to execute an INSERT statement). Navigation to another page then takes place. The next page will display a JSF table with the contents of the database table.  Display the accepted status using a checkbox and use output text fields for everything else.