I would switch to using the built-in Mach-II command called event-bean to populate your beans. Mach-II 1.8 adds the ability to populate inner beans (as you indicate you have a need for):
http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/wiki/ConfigFileExplained#event-bean Since you'll need to get the bean from the transfer factory, then you'll need to use the "reinit=false" attribute in event-bean (because normally event-bean inits a bean for you using the dot path). Your code will look a bit like: <event-handler event="someEvent"> <filter name="getTransferObject"> <parameter name="bean" value="someKeyToGetBean"/> <parameter name="eventArgName" value="myBean"/> </filter> <event-bean name="myBean" reinit="false" type="dummyPath"> <inner-bean name="someOtherBeanInsideThisCFC"/> </event-bean> </event-handler> Best, .Peter Dave said the following on 09/30/2009 06:07 PM: > Hi All, > > We have an objectFactory filter which is able to retrieve object from > a specified model Factory and populate it's properties from event-args > using a list of properties specified in the form post. > > When the form is drawn, we draw a hidden field which contains the list > of properties to set. This works quite nicely and frees us from having > to write boiler plate code to populate an object's properties form > event-args. > > However, we are using TransferORM for objects and this approach > doesn't work for setting an object's properties with child objects. > IE, in Transfer/Mach-ii, you will do a myObject.setSomeStatus > (getmyFactory().getSomeStatus(arguments.event.getArg > ('someStatusID'))). > > Currently, this type of code ends up in the validate method in the > listeners which doesn't feel quite right. > > Has anyone else solved this problem before? I can think of a couple > of ways to do it, non of which exactly elegant. > > > Thanks, > Dave > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to Mach-II for CFML list. 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/mach-ii-for-coldfusion?hl=en SVN: http://greatbiztoolsllc.svn.cvsdude.com/mach-ii/ Wiki / Documentation / Tickets: http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/ -~----------~----~----~----~------~----~------~--~---
