• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Employee Application developed in Struts

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
reply
    Bookmark Topic Watch Topic
  • New Topic