This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Employee Application developed in Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Employee Application developed in Struts" Watch "Employee Application developed in Struts" New topic
Author

Employee Application developed in Struts

Rebecca Abraham
Ranch Hand

Joined: Feb 20, 2003
Posts: 37
Hi,

I have an Employee Mangement application which does the following functionality
1. Add Employee
2. Edit Employee
3. Delete Employee
4. List Employees.

The flow of the appln is as follows :
1. Login to the Application
2. List Employee Screen displayed
3. From List Employee Screen Add,Edit/Delete Employee is possible.

My requirement is that I want a single form class to hold all Employee data (Emp Id, Name, Addr) which can be used across all screens.
I encountered an issue while coding this form class -
The Delete Employee screen requires only the Emp Id form-property,so I had to create a new form class for that screen exclusively.
I found that there is duplication of form beans.
Is there a better approach in Struts than creating separate form classes for every screen?

Thanks!
aitor alzola
Greenhorn

Joined: Sep 07, 2004
Posts: 14
Rebecca, you can just use the same form for delete, edit ... using the fields you need for each task. you�ll have some usseless fields in some moments, but I think it�s not a problem. Good Luck!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Employee Application developed in Struts
 
Similar Threads
how to create insert, update, delete buttons on the same page?
Should we always 'synchronize' the db operations?
Sample Struts Application
Employee manage ment system java
How Struts will identify Class (with get / set methods) associated with it