Вы находитесь на странице: 1из 2

Tiles - Exercise

#1 Program
Create a Struts basic tiles program with top, left, right, bottom, and center and print the respective title in
each area.

#2 Program
Create a Struts basic tiles program with the below layout

Table name: java_employees


Table structure:

Connection details
JDBC_DRIVER = "oracle.jdbc.driver.OracleDriver"
DB_URL = "jdbc:oracle:thin:@192.168.1.12:1521:edukdev"
USER_NAME = "HOT_ACADEMY" ; PASSWORD = "ha11marks"

Employee / department Master Date : _____


Author : _____
Add Employee Welcome to tiles program
View employee info Please select the menu from the left navigation
View departments
View department info
Go Home…
Add Employee | View employee info | View departments | View department info | Go Home…

Add employee
Read data for the below fields and add to the database using insert statement
EMPLOYEE_ID NUMBER(6),
FIRST_NAME VARCHAR2(20 BYTE),
LAST_NAME VARCHAR2(25 BYTE) NOT NULL,
EMAIL VARCHAR2(25 BYTE) NOT NULL,
PHONE_NUMBER VARCHAR2(20 BYTE),
JOB_ID VARCHAR2(10 BYTE) NOT NULL,
SALARY NUMBER(8,2),
COMMISSION_PCT NUMBER(2,2),
MANAGER_ID NUMBER(6),
DEPARTMENT_ID NUMBER(4)

View employee
Populate the employee names to a select box, on changing the dropdown show the above data for that
employee in the table with the proper headings in the same page.
“<Employee_id>” “ <firstname>,<last-name>”

Procedure details: JAVA_ACADEMY.GET_EMPLOYEE_INFO_PRC (


p_employee_id IN NUMBER ,
lc_employee_info OUT SYS_REFCURSOR
Columns from cursor:
employee_id
first_name
last_name
Tiles - Exercise

email
phone_number
hire_date
job_id
salary

View departments info


Read the department id and submit button, print the department information in the same page for the
given department_id. Using the below procedure.

PROCEDURE java_academy.get_department_data_prc(p_department_id IN NUMBER ,


lc_department_info OUT SYS_REFCURSOR
)
Columns from cursor:
department_id
department_name
manager_id
location_id

View departments
View all the department from using the below procedure along with a “View Department” links at the
end which takes to the view department information page.

PROCEDURE java_academy.get_department_data_prc(p_department_id IN NUMBER,


lc_department_info OUT SYS_REFCURSOR
)
Columns from cursor:
department_id
department_name
manager_id
location_id

Note:
1. Validate the respective fields with struts validation
2. Highlight the respective heading with the color RED when selected.
Example
Employee / department Master Date : _____
Author : _____
Add Employee Add Employee
View employee info
View departments <FORMS>
View department info
Go Home… <SUBMIT BITTON>
Add Employee | View employee info | View departments | View department info | Go Home…
s

Вам также может понравиться