0
Participant
,
/t5/coldfusion-discussions/getting-error-when-trying-to-initializing-bean/td-p/889767
Aug 09, 2008
Aug 09, 2008
Copy link to clipboard
Copied
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>
TOPICS
Advanced techniques
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 Correct answer
Participant
,
Aug 10, 2008
Aug 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.
Participant
,
LATEST
/t5/coldfusion-discussions/getting-error-when-trying-to-initializing-bean/m-p/889768#M81862
Aug 10, 2008
Aug 10, 2008
Copy link to clipboard
Copied
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.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

