Hi I am struggling with the best approach to take with my first Struts application and wondered if I could get some voices of experience.
I have a 1->m relationship (Supplier -> Products) that I wish to represent in a maintenance application. You can Add or Edit a Supplier, and then within this Add or Edit you can Add or Edit Products. My persistence layer provides a Supplier Data Transfer Object(DTO) representing the Supplier->Products (The Supplier holds a Collection of Product DTO's). At the moment I have ActionForm for Supplier held in session scope containing a collection of Product ActionForms. Depending on Add or Edit these are populated from the Supplier DTO. When a Save is finally executed I create a Supplier DTO and populate it from the Supplier ActionForm and collection of Product ActionForms. The DTO is passed to the persistence layer. I still have logic in the Action classes that I do not like, for example the Save determines whether to call insert() or update() on my persistence layer. I think I need a Workflow type class where a method Save() will determine whether to call insert() or update(). So, any comments of my current approach? Suggestions for improvements? Thanks Shane Shane Mingins Analyst Programmer Assure NZ Ltd Ph 644 494 2522 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]