Answered
Getting Error When Trying to Initializing Bean
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 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>
