All data changes are done by calling Manager methods with Action Forms to update the relevant data e.g.
new ShopManager().createOrder(createOrderForm);
or new ShopManager.updateOrder(updateOrderForm);
My problem is that I am having to create duplicate JSPs and actions for the create and update processes. The pages look exactly the same and hold the same values but the difference is that the update actions will pre populate the form with the existing methods and invoke the update method on the manager instead of a standard create. Even the forms are identical (The update form extends the create form but holds a reference to the data id that is to be updated).
My question is: Is there a way to have one set of JSPs, Forms and actions to manage all of this. When I change a JSP I am having to maintain two pages which sounds trivial but to me shouts of bad design. The only difference between the pages is that they call different actions i.e. /order/create/stage1.do vs /order/update/stage1.do
I would be interersted to know peoples thoughts.
Cheers,
Mark
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]