Sorry for the long post but I've been working on this for a few days
and have got nowhere
I'm working with flex and cf and I have a bean.. it looks okay but
just testing it with an init() function is giving me an error
The argument HEADLINE_ID passed to function init() is not of type numeric
I'm not passing headline_id to the init() function...
the code in the .cfm is simple it's just a createobject call to the cfc..
<cfset bean = createobject("path.to.my.cfc.headlines").init() />
and here's the bean... there's another bean in another directory set
up almost exactly the same way and I can init that bean with no error.
<cfcomponent alias="path.to.my.cfc.headlines">
<cfproperty name="headline_id" type="numeric" default="" />
<cfproperty name="headline" type="string" default="" />
<cfproperty name="actiondate" type="date" default="" />
<cfproperty name="effdate" type="date" default="" />
<cfproperty name="endeffdate" type="date" default="" />
<cfproperty name="actionuser" type="string" default="" />
<cfscript>
variables.instance = StructNew();
variables.instance.headline_id = 0;
variables.instance.headline = "";
variables.instance.actiondate = "";
variables.instance.effdate = "";
variables.instance.endeffdate = "";
variables.instance.actionuser = "";
</cfscript>
<cffunction name="init" output="false"
returntype="path.to.my.cfc.headlines">
<cfargument name="headline_id" type="numeric" required="false"
default="" />
<cfargument name="headline" type="string" required="false"
default="" />
<cfargument name="actiondate" type="date" required="false"
default="" />
<cfargument name="effdate" type="date" required="false"
default="" />
<cfargument name="endeffdate" type="date" required="false"
default="" />
<cfargument name="actionuser" type="string" required="false"
default="" />
<cfset setheadline_id(arguments.headline_id) />
<cfset setheadline(arguments.headline) />
<cfset setactiondate(arguments.actiondate) />
<cfset seteffdate(arguments.effdate) />
<cfset setendeffdate(arguments.endeffdate) />
<cfset setactionuser(arguments.actionuser) />
<cfreturn this>
</cffunction>
<cffunction name="setMemento" access="public"
returntype="arc_headlines" output="false">
<cfargument name="memento" type="struct" required="yes"/>
<cfset variables.instance = arguments.memento />
<cfreturn this />
</cffunction>
<cffunction name="getMemento" access="public" returntype="struct"
output="false" >
<cfreturn variables.instance />
</cffunction>
<cffunction name="setheadline_id" output="false" access="public"
returntype="void">
<cfargument name="headline_id" required="true">
<cfset variables.instance.headline_id = arguments.headline_id>
</cffunction>
<cffunction name="getheadline_id" output="false" access="public"
returntype="numeric">
<cfreturn variables.instance.headline_id>
</cffunction>
<cffunction name="setheadline" output="false" access="public"
returntype="void">
<cfargument name="headline" required="true">
<cfset variables.instance.headline = arguments.headline>
</cffunction>
<cffunction name="getheadline" output="false" access="public"
returntype="string">
<cfreturn variables.instance.headline>
</cffunction>
<cffunction name="setactiondate" output="false" access="public"
returntype="void">
<cfargument name="actiondate" required="true">
<cfset variables.instance.actiondate = arguments.actiondate>
</cffunction>
<cffunction name="getactiondate" output="false" access="public"
returntype="date">
<cfreturn variables.instance.actiondate>
</cffunction>
<cffunction name="seteffdate" output="false" access="public"
returntype="void">
<cfargument name="effdate" required="true">
<cfset variables.instance.effdate = arguments.effdate>
</cffunction>
<cffunction name="geteffdate" output="false" access="public"
returntype="date">
<cfreturn variables.instance.effdate>
</cffunction>
<cffunction name="setendeffdate" output="false" access="public"
returntype="void">
<cfargument name="endeffdate" required="true">
<cfset variables.instance.endeffdate = arguments.endeffdate>
</cffunction>
<cffunction name="getendeffdate" output="false" access="public"
returntype="date">
<cfreturn variables.instance.endeffdate>
</cffunction>
<cffunction name="setactionuser" output="false" access="public"
returntype="void">
<cfargument name="actionuser" required="true">
<cfset variables.instance.actionuser = arguments.actionuser>
</cffunction>
<cffunction name="getactionuser" output="false" access="public"
returntype="string">
<cfreturn variables.instance.actionuser>
</cffunction>
</cfcomponent>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320543
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4