On Jun 23, 2009, at 7:20 PM, Matthew Woodward wrote:
> Teaman wrote:
>> Well, the problem is back again. This is most frustrating. I can't
>> explain what is going on here. This time my instantiation of the
>> document bean is this:
>> <cfset document = createObject("component",
>> "model.document").init( ID
>> = arguments.event.getArg("id") ) />
>
> You don't need the ID = arguments.event.getArg("id") bit. If ID is
> your first argument you can just do:
> <cfset document = CreateObject("component",
> "model.document").init(arguments.event.getArg("id")) />
Yea I realize that and even tried that before. I'll try it again.
This whole problem is acting like the framework components are loading
but I would make other changes like inserting a cfdump of the
arguments.event.getArg("id") value to make sure it was a number and it
is and it shows up.
> Doesn't really address your issue, but that extra stuff is overkill.
>
> And I think I put this in my last email but you can set a default to
> handle cases where ID doesn't exist in the event:
> <cfset documen nt = CreateObject("component",
> "model.document").init(arguments.event.getArg("id", 0)) />
That's a great tip. Didn't know that.
>> I change the above to be this:
>> <cfset document = createObject("component",
>> "model.document").init( ID
>> = 26239) />
>> and it still produces the exact same error.
>
> Try it without ID = and see what happens. (Shouldn't matter but when
> I'm having issues, I always strip out anything extraneous for
> troubleshooting purposes.)
I'll give that a shot when I get back in to work.
> If you can't even create the bean on a regular ol' CFML page without
> it erroring out then something's up with your bean, so make sure and
> try instantiating that bean outside the context of Mach-II just to
> see what happens.
I did that earlier after your previous email and it worked fine. It
was about then that the null parameter (default) case started working.
--~--~---------~--~----~------------~-------~--~----~
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/
-~----------~----~----~----~------~----~------~--~---