I'm still having an issue however but this I think is related to my code.
I'm using the Real Estate Sample Application from the fine folks at asfusion.com as the model for what I'm trying to do so this involves flash forms and flash remoting.
My actionscript code looks like this:
public function submitEdit():Void {
var editArguments:Object = {};
<!--- simple text inputs --->
editArguments.analystname = analystname.text;
editArguments.shortName = shortName.text;
editArguments.email = email.text;
<!--- only make call if all required fields are supplied --->
if( mx.validators.Validator.isStructureValid(this, 'HelpFormAdmin') ){
<!--- show clock cursor --->
mx.managers.CursorManager.setBusyCursor();
if (HelpFormAdmin.myGlobalObjects.isEditMode) {
<!--- call service --->
HelpFormAdmin.myGlobalObjects.AnalystDAO.update (editArguments.analystname, editArguments.shortName, editArguments.email);
}
else {
<!--- call service --->
HelpFormAdmin.myGlobalObjects.AnalystDAO.create(editArguments.analystname , editArguments.shortName, editArguments.email);
}
}
}
What I've done is stick the following code in the AnalystDAO cfc in my data folder:
<cffunction name="create" access="remote" returntype="struct" output="false" description="Creates an analyst">
<cfargument name="analystName" required="true" type="string" hint="Analyst Name"/>
<cfargument name="shortName" required="true" type="string" hint="Short Name" />
<cfargument name="email" required="true" type="string" hint="Email" />
<!--- create an analystRecord --->
<cfset analystRecord = Application.Reactor.createRecord("Analyst") />
<!--- populate the Analyst --->
<cfset analystRecord.setAnalystName(arguments.analystName) />
<cfset analystRecord.setShortName(arguments.shortName) />
<cfset analystRecord.email(arguments.email) />
<!--- Save the Analyst --->
<cfset analystRecord.save() />
</cffunction>
However I get the following error when trying to create a new record:
Error: CF Adaptor Service: Service admin.helpform.data.dao.AnalystDAO does not have a method "create" that matches the name and parameters provided.
Am I trying to do something that is not possible to do with reactor or is my code all wrong?
Thanks,
Ray
On 3/30/06, Ray Buechler
<[EMAIL PROTECTED]> wrote:
João,
Thanks....the <project> property was missing. Now I get the following error though:
The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code.Null Pointers are another name for undefined values.
If I go back into Reactor.xml and remove the project property my code will run.
Thanks,
RayOn 3/30/06, João Fernandes <[EMAIL PROTECTED]> wrote:It seems that you don't have your <project> property set in your config file.
Define it and try again.
João Fernandes
Dep. Informática - Área de Desenvolvimento
Cofina media
Avenida João Crisóstomo, Nº 72 . 1069-043 Lisboa PORTUGAL
Tel (+351) 213 185 200 . Fax (+351) 213 540 370
[EMAIL PROTECTED]
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Ray Buechler
Sent: quinta-feira, 30 de Março de 2006 16:54
To: [email protected]
Subject: [Reactor For CF] Project DAO Files
This may be sort of a weird question but what determines if a DAO cfc is generated in the project directory?
I'm trying to write some custom code in the custom DAO object and when I run the code I get an error message "Could not find the ColdFusion Component reactor.project..DAO.AnalystDAO"
Sure enough there is no AnalystDAO CFC in the project\dao directory.
I did delete my project files with the same result.
Any suggestions would be appreciated greatly.
Ray
-- Reactor for ColdFusion Mailing List -- [email protected] -- Archives at http://www.mail-archive.com/reactor%40doughughes.net/-- Reactor for ColdFusion Mailing List -- [email protected] -- Archives at http://www.mail-archive.com/reactor%40doughughes.net/
-- Reactor for ColdFusion Mailing List -- [email protected] -- Archives at http://www.mail-archive.com/reactor%40doughughes.net/

