This is part of the reason why I created my FormUtility CFC ( http://formutils.riaforge.org/index.cfm). You can name form elements like " user.firstName", "user.lastName", etc. The CFC will convert this into a struct called "user" with keys "firstName" and "lastName", etc. This makes it much easier to pass just want you want into the service layer from the controller. It does arbitrarily nested structs, arrays, arrays of structs, etc., based on the form field names.
On 10/22/07, Matt Williams <[EMAIL PROTECTED]> wrote: > > I found this to be of interest because of some of my coding habits > (that probably need to be changed) where I pass the entire Mach II > event arguments to my service layer > (argumentCollection=event.getArgs()). The service layer's function > declares only the needed arguments. I then loop over those arguments > to set the values in a bean. > > Until now, I didn't realize I was looping over more than just what I > declared, but anything within the struct returned by event.getArgs(). > With proper naming conventions it probably would never be an issue, > but I thought it would be good to be aware of nonetheless. > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CFCDev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfcdev?hl=en -~----------~----~----~----~------~----~------~--~---
