I think we're tackling different issues here. What I'm trying to avaoid is having (1) a data transfer object used by the different tiers, and (2) a form bean object or dyna form bean definition which is a close reflection of the fields that the DTO already defines, and (3) a validation rule xml which lists down all/most of the fields along with rules on how to validate each. Of course, I'll also need to write code to convert my DTO to a form bean and vice versa. I'm thinking we can lose the explicit form bean definition and the code which converts between the DTO and form bean.
--- Mete Kural <[EMAIL PROTECTED]> wrote: > >For a given form/action, the framework will be supplied with the FQCN of the > >DTO/VO. From there, it can determine what the fields of the form will be. > The > >form bean validation/descriptor XML will provide the validation information > and > >any conversion rules as needed to format/parse between the value object and > the > >string representation for the form bean. > > That sounds very interesting. I think there is interest in having support for > dynamic forms where the fields of the form are determined dynamically rather > than hardcoded in the JSP. What are the ideas on how to handle dynamic field > names (and number of fields) in Struts 2.0? > > Let's say that we are designing a dynamic customer information editing form. > Every user has different preferences on what fields they want to edit or > allowed to edit. Action class accesses a web service and receives a SOAP > response with exactly those fields that are fit for this user. How could Struts > assemble the form dynamically and pre-populate the customer information and > then validate it when the user submits? > > Regards, > Mete > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]