yes Adam I am using CF8. I have tried this, but I have other
errors, that I seem that I cannot pin point.
In My Flex app I call this function:
private function saveTask():void {
var obj:ScheduleTask = new ScheduleTask;
/* Sets id if record is to be updated */
if(_taskList.selectedIndex != -1){
obj.scheduletaskid = _taskList.selectedItem.scheduletaskid;
}
if(taskAction == "pause") {
obj.activetask = String("Non Active");
}
else {
obj.activetask = String("Active");
}
obj.task = String(_task.text);
obj.taskaction = String(taskAction);
obj.description = String(_description.text);
obj.startdate = _startDate.selectedDate as Date;
obj.starttime = String(_startTime.text +
_startDayLight.text);
obj.enddate = _endDate.selectedDate as Date;
obj.endtime = String(_endTime.text + _endDayLight.text);
obj.operationtask = String(_operationTask.selectedField);
obj.portnumber = Number(_portNumber.text);
obj.proxypassword = String(_proxyPassword.text);
obj.proxyport = Number(_proxyPort.text) ;
obj.proxyserver = String(_proxyServer.text);
obj.proxyuser = String(_proxyUser.text);
obj.publish = String(publishGroup.selectedValue);
obj.publishfile = String(_publishFile.text);
obj.publishpath = String(_publishPath.text);
obj.requesttimeout = Number(_requestTimeOut.text);
obj.resolveurl = String(resolveURLGroup.selectedValue);
if(intervalGroup.selectedValue == "time"){
obj.taskinterval = String(_taskIntervalSeconds.text);
}
else {
obj.taskinterval = String(_taskIntervalDates.text);
}
obj.urlpassword = String(_urlPassword.text);
obj.urlpath = String(_urlPath.text);
obj.urlusername = String(_urlUserName.text);
/* if(_taskList.selectedIndex != -1 &&
_taskList.selectedItem.createdby != null){
obj.createdby = String(_taskList.selectedItem.createdby);
obj.updatedby = String(userSession.getItemAt(0).username);
}
else {
obj.createdby = String(userSession.getItemAt(0).username);
obj.updatedby = String("");
} */
roSchedule.setSchedule(obj);
roTaskSchedules.save(obj);
}
Now the ro.Schedule.setSchedule(obj); tag send the array to
the cfc using RemoteObject tag.
Then I get this error:
[RPC Fault faultString="Unable to invoke CFC - The TASKACTION
parameter to the setSchedule function is required but was not
passed in." faultCode="Server.Processing" faultDetail=""]
at mx.rpc::AbstractInvoker/
http://www.adobe.com/2006/flex/mx/internal::faultHandler()[C:\dev\depot\flex\branches\flex_201_borne...
at
mx.rpc::Responder/fault()
at
mx.rpc::AsyncRequest/fault()
at
NetConnectionMessageResponder/statusHandler()
at
mx.messaging::MessageResponder/status()
It seems this error has to do with the TASKACTION attributes
that I have in place, but I have looked this over and it is a
String Value and is Data Typed as String.
I guess the reason why I thought this wouldn't really work is
that you have to execute the cfschedule in a page, by opening the
page like I have done some many time. I just really don't see the
connection of this code really executing. I am still pretty new at
CFC's.
Can you explain more about what you said on the
"attributecollection attribute"?
By the way thanks for the response, I have been banging my
head on this subject for a few days now. plus the fact that I have
the flu. Thanks alot.
Link