Skip to main content
Inspiring
August 10, 2008
Answered

Getting Error When Trying to Initializing Bean

  • August 10, 2008
  • 1 reply
  • 477 views
Hi guys I used Illudium last year and I was very happy with it. I am having a real proplem initializing the bean what am I doing wrong?
This is the code that I used.
<cfset assignpm = createObject("component", "labrate.admin.cfc.assignpm").init()>
This is my error code coming back, I can't seem to get past this. Whwn I drop the .init I am able to create the object.
The value returned from the init function is not of type labrate.admin.cfc.assignpm.
Below is a little code from the bean.
<cffunction name="init" access="public" returntype="labrate.admin.cfc.assignpm" output="false">
<cfargument name="ASSGPM_ID" type="string" required="false" default="" />
<cfargument name="EMAILNOTIFY" type="string" required="false" default="" />
<cfargument name="EMAILCOUNT" type="string" required="false" default="" />
<cfargument name="ASSIGNEDPM" type="string" required="false" default="" />
<cfargument name="NATLAB" type="string" required="false" default="" />
<cfargument name="NATPROG" type="string" required="false" default="" />
<cfargument name="PMASSIGNEDID" type="string" required="false" default="" />
<cfargument name="DATEASSIGNED" type="string" required="false" default="" />
<cfargument name="WHOASSIGNED" type="string" required="false" default="" />

<!--- run setters --->
<cfset setASSGPM_ID(arguments.ASSGPM_ID) />
<cfset setEMAILNOTIFY(arguments.EMAILNOTIFY) />
<cfset setEMAILCOUNT(arguments.EMAILCOUNT) />
<cfset setASSIGNEDPM(arguments.ASSIGNEDPM) />
<cfset setNATLAB(arguments.NATLAB) />
<cfset setNATPROG(arguments.NATPROG) />
<cfset setPMASSIGNEDID(arguments.PMASSIGNEDID) />
<cfset setDATEASSIGNED(arguments.DATEASSIGNED) />
<cfset setWHOASSIGNED(arguments.WHOASSIGNED) />

<cfreturn this />
</cffunction>
This topic has been closed for replies.
Correct answer murpg
Hi guys, I figured out my problem in my Bean I needed to just return the component. Rather than have the return type as labrate.admin.cfc.assignpm all I needed was assignpm which is the component name of the Bean.

1 reply

murpgAuthorCorrect answer
Inspiring
August 10, 2008
Hi guys, I figured out my problem in my Bean I needed to just return the component. Rather than have the return type as labrate.admin.cfc.assignpm all I needed was assignpm which is the component name of the Bean.