Thanks for any help, or spelling errors you can point out.
Scott
<cffunction name="UpdateDescription" access="remote" returntype="string" >
<cfargument name="newDescription" required="true" type="string">
<cfargument name="descriptionUpPK" required="true" type="string">
<cfquery name="UpdateDescription" datasource="CAAA">
update DRDESCRIPTION
set DESCRIPTION = <cfqueryparam cfsqltype="cf_sql_CLOB"
value="#arguments.newDescription#" />
where CONTROLNUMBER=<cfqueryparam cfsqltype="cf_sql_varchar"
value="#arguments.descriptionUpPK#" />
</cfquery>
<cfset msg = 'The DR was updated.'>
<cfreturn msg/>
</cffunction>
<cffunction name="UpdateEng" access="remote" returntype="string" >
<cfargument name="newENGRemark" required="true" type="string">
<cfargument name="engUpPK" required="true" type="string">
<cfquery name="UpdateEng" datasource="CAAA">
update DRENGINEER
set ENGREMARKS = <cfqueryparam cfsqltype="cf_sql_CLOB"
value="#arguments.newENGRemark#" />
where CONTROLNUMBER=<cfqueryparam cfsqltype="cf_sql_varchar"
value="#arguments.engUpPK#" />
</cfquery>
<cfset msg = 'The DR was updated.'>
<cfreturn msg/>
</cffunction>
<mx:RemoteObject id="Remarks" source="cfcs/manufacturing/DR"
showBusyCursor="true" destination="ColdFusion">
<mx:method name="updateDescription" fault="faultHandler(event)" >
<mx:arguments>
<newDescription>{DescriptionRTE.htmlText}</newDescription>
<newENGRemark>{EngRTE.htmlText}</newENGRemark>
<descriptionUpPK>925001</descriptionUpPK>
</mx:arguments>
</mx:method>
<mx:method name="UpdateEng" fault="faultHandler(event)" >
<mx:arguments>
<newENGRemark>{EngRTE.htmlText}</newENGRemark>
<engUpPK>925001</engUpPK>
</mx:arguments>
</mx:method>
</mx:RemoteObject>
The problem seems to revolve around the value {EngRTE.htmlText}. So, what
happens when you replace
[i]<newENGRemark>{EngRTE.htmlText}</newENGRemark>[/i]
with
[i]<newENGRemark>0</newENGRemark>[/i]?
I use a action script function saveItem() (see attached code)
I also use a MVC
You can then check the method call like so
Alert.show( ObjectUtil.toString(this.Remarks.UpdateEng.arguments) );
I then use cffile to save the cfc arguments to a text file as the first action
in the cfc
Or you can include a result attribute on the method and return the cfc
argument back to flex to check the value.
If the value is present in the first function, then just pass all values
through this function and have 2 update queries in the one function.
Check to ensure that the name of the form element matches the call in the
method.
Ken
<mx:Script>
<![CDATA[
private function saveDescription():void
{
this.dataManager.save(this.DescriptionRTE.htmlText. this.EngRTE.htmlText,
925001);
}
private function saveEngRTE():void
{
this.dataManager.save(this.EngRTE.htmlText. 925001);
}
]]>
</mx:Script>
<mx:RemoteObject id="Remarks" source="cfcs/manufacturing/DR"
showBusyCursor="true" destination="ColdFusion">
<mx:method name="updateDescription" fault="faultHandler(event)" />
<mx:method name="UpdateEng" fault="faultHandler(event)" />
</mx:RemoteObject>
<mx:Button id="saveBtn" label="Save" click="saveDescription()" />
<mx:Button id="saveBtn" label="Save" click="saveEngRTE()" />
If yours too fails, then it can only be one of two things. Either we're
missing something obvious, or there is a bug.
I changed to the dots, but no different.
Good luck.
I have also had the odd occasion where my changes where not reflected. I
found that doing a project cleam helped.
menu option project/clean.
The path to the cfc has to be dot seperated, dame copy and paste...
Ken