• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Getting Error When Trying to Initializing Bean

Participant ,
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>
TOPICS
Advanced techniques

Views

410

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 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.

Votes

Translate

Translate
Participant ,
Aug 10, 2008 Aug 10, 2008

Copy link to clipboard

Copied

LATEST
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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation