Ok, thanks for the clarification on when it swaps in the default supplied.
It is an empty string value "" in this case, which I thought wouldn't matter
but obviously it does. 
I'll  modify my code to accommodate.

Thanks Matt!


> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of 
> Matthew Woodward
> Sent: Wednesday, June 24, 2009 5:25 PM
> To: [email protected]
> Subject: [Mach-II] Re: Empty Beans
> 
> Teaman wrote:
> > 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.)
> 
> Well, there's no real null in CFML, so this would set id to 0 
> *if id doesn't exist in the event*, but would not do so if id 
> exists in the event and is a zero-length string. "" != undefined.
> 
> > 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.
> 
> Then that means id exists in the event and is "". Again, the 
> default will only kick in if id doesn't exist in the event.
> 
> Have you tried arguments.event.isArgDefined('id') to see 
> what's going on? I think Peter mentioned that in another email.
> --
> Matthew Woodward
> [email protected]
> http://www.mattwoodward.com/blog
> 
> Please do not send me proprietary file formats such as Word, 
> PowerPoint, etc. as attachments.
> http://www.gnu.org/philosophy/no-word-attachments.html
> 



--~--~---------~--~----~------------~-------~--~----~
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/
-~----------~----~----~----~------~----~------~--~---

Reply via email to