On Jun 23, 4:27 pm, Matthew Woodward <[email protected]> wrote:
>
> Actually this is your CFML engine throwing this error, so somewhere
> you're either manually calling a setter, or you're passing in a
> zero-length string as an argument to your constructor.
>
> If you do foo.init("") that will throw an error because if an argument
> is passed in for ID and isn't numeric, it'll blow up. If there is no
> argument passed in, then it will use the default of 0, which is why I
> suspect that somewhere you're passing in an argument for ID.
I am not passing any argument for this event as indicated in my code
posted.
What would be the scope of where a passed argument for ID would do
this?...
The event? the listener? the app?
> Based on the bean code it should work fine--there's something else amiss
> somewhere because, and you can test this to verify, I bet you can create
> a plain ol' CFML page and create that object passing it no paramters in
> the init() method and it'll work fine.
>
> Are you using event-bean from a form submission by chance?
No. I don't know how to use them yet.
In case it makes a difference, here is the function where the document
bean is embedded.
<cffunction name="getDocumentDetails" output="false" access="public"
returntype="model.document" hint="returns a populated Document Bean">
<cfargument name="event" type="MachII.framework.Event"
required="true" />
<cfset var document = "" />
<cfset var documentDAO = "" />
<cfset var docID = arguments.event.getArg("id") /> <!--- not
used
yet --->
<cfset document = createObject("component",
"model.document").init
() />
<cfset documentDAO = createObject("component",
"model.documentDAO").init( DSN = getProperty("dsn") ) />
<cfset documentDAO.read(document) />
<cfreturn document />
</cffunction>
> --
> 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
>
> smime.p7s
> 4KViewDownload
--~--~---------~--~----~------------~-------~--~----~
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/
-~----------~----~----~----~------~----~------~--~---