On 12/16/05, Paul Benedict <[EMAIL PROTECTED]> wrote: > > > I am not suggestign you create a new business object. I am suggesting you > create a new object for input purposes. You need a transport layer between > your model and the web; thus you have an ActionForm. But you need to pad > your ActionForm with additional objects because of the complexity of your > app.
In a sense though they "do" become duplicat objects of standard POJOs that you use in the backend. You keep mentioning you only need to add the properties that you need for input, and sure that's fine, that might save you a couple minutes of work not having to add those properties, but I'll explain more about the problem with that later. > > > No. You only create properties for the values you need for INPUT. As I > said in previous emails, if you have a business object with 50 properties > but only need to capture input for 3, your input object only needs 3 > properties. I understand that you can do something like you mention above, but have you tried to do that? It brings me back full circle to my original point that I haven't found a clean solution at all. Say we are back to a list of users and each user has multiple "addresses." You want to update all the address information for each address including the Integer "zipCode." Are you going to make a new object called AddressWithPropsForJustInput - even though you need to input 99% of what's alredy in "Address" (as Strings) except for the zip (thus duplicating 99% of what already exsists). Doing this will also require a new Employee object that can take your "AddressWithPropsForJustInput" so that you can populate your list of EmployeesWitPropsJustForInput in your ActionForm. You then have to get all this info back into a List of regular Employees - and if you didn't lazyLists up front inside of Employee - you are going to have a nice ugly time looping through everything and recreating objects and populating your input fields into them. Bottom line is it is going to be *extremely* messy - I've actually tried using that approach as well. I've tried even embedding the value objects into my ActionForm DTOs - for example AddressWithPropsJustForInput { Address address; //standard value object from domain setAddress(..)// puts an Address object into the object. Th -- Rick