Teaman said the following on 06/24/2009 07:17 PM: > Matt > I've tried this and it doesn't work for me. My understanding is that > if id is null value, then insert the 0 (in this example.) > > I placed this prior to my instantiation of the document bean > <cfdump var="#arguments.event.getArg('id', 0)#"><cfabort> > > and I get [empty string] back. > This is placed within a listener method that passes in the event obj. > You're getting the empty string back because the getArg("nameOfArg", [optionalDefault]) gets an argument from the Event object. If an argument if the passed named is not defined, Mach-II will return "" (zero length string) or the optional default if defined.
So "id" is available as an argument somewhere in your request because the optional default is not being used. Documentation: http://greatbiztoolsllc-trac.cvsdude.com/mach-ii/wiki/FAQEventObject#CommonEventObjectMethods http://www.mach-ii.com/cfcdocs/1-6-0/MachII.framework/MachII.framework.Event.html#getArg --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to Mach-II for CFML list. To post to this group, send email to mach-ii-for-coldfusion@googlegroups.com To unsubscribe from this group, send email to mach-ii-for-coldfusion-unsubscr...@googlegroups.com 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/ -~----------~----~----~----~------~----~------~--~---