> have been able to work with CFC's. I have a getID() method:
>
><cffunction name="getID" access="public" output="true"
>returntype="numeric" >
> <cfreturn instance.ID >
> </cffunction >
>
>I first create my object:
>
><cfinvoke
>component="#application.config.CFCOMPONENTS_PREFIX#com.seacrets.boutique.size"
>method="get" returnvariable="formsize" >
> <cfinvokeargument name="ID" value="#url.id#" >
> </cfinvoke >
>
>My object is there, with data (thank you cfdump). But when I call my
>getID() method...:
>
><input type="Hidden" name="id" value="<cfscript
> >formsize.getID();</cfscript >" >
>
>I am receiving the following error:
>
>Method selection Exception.
>An exception occurred during method selection process for Method getID
>The cause of this exception was that either there are no methods with
>the the specified method name and argument types, or the method getID is
>overloaded with arguments types that Coldfusion can't decipher
>reliablly. Use javacast function to reduce ambiguity.
>
>The error occurred
>
>Which of course points to the above line. What am I doing wrong here?
>
Shouldn't your cfinvoke be calling getID instead of just get? You have:
<cfinvoke
component="#application.config.CFCOMPONENTS_PREFIX#com.seacrets.boutique.size"
method="get" returnvariable="formsize" >
<cfinvokeargument name="ID" value="#url.id#" >
</cfinvoke >
but I think it should be
<cfinvoke
component="#application.config.CFCOMPONENTS_PREFIX#com.seacrets.boutique.size"
method="getID" returnvariable="formsize" >
<cfinvokeargument name="ID" value="#url.id#" >
</cfinvoke >
PS -- Since your method is not outputting anything, change the output
attribute to "false".
Regards,
Dave.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

