all groups > coldfusion flash integration > december 2006 >
You're in the

coldfusion flash integration

group:

CFGRID Refresh/Reload



CFGRID Refresh/Reload reya276
12/13/2006 6:40:26 PM
coldfusion flash integration: I want to refresh/reload a CFGRID after I perform an update, how would I go
about doing this?
here is the action script code I'm using below, can anyone provide the code
for me to do this or just modify the one below because I'm having a tuff time
getting this to work, I also tried getting some tips for the here
(http://tutorial127.easycfm.com/) but I guess I just don't get it.

<cfsavecontent variable="updLocation">

if (loc_nameB.text == '')
{
mx.controls.Alert.show('location Name is required!');
}
else if (loc_addressB.text == '')
{
mx.controls.Alert.show('location Address is required!');
}
else if (loc_cityB.text == '')
{
mx.controls.Alert.show('location City is required!');
}
else if (loc_stateB.text == '')
{
mx.controls.Alert.show('location State is required!');
}
else if (loc_zipcodeB.text == '')
{
mx.controls.Alert.show('location Zipcode is required!');
}
else if (loc_phoneB.text == '')
{
mx.controls.Alert.show('location Tel.Number is required!');
}
else if (loc_managerB.text == '')
{
mx.controls.Alert.show('location Manager is required!');
}
else if (loc_hoursB.text == '')
{
mx.controls.Alert.show('location Hours are required!');
}
else
{
//create connection, replacing the gateway url with yours
var connection:mx.remoting.Connection =
mx.remoting.NetServices.createGatewayConnection("http://<cfoutput>#cgi.HTTP_HOST
#</cfoutput>/flashservices/gateway/");

//declare service
var myService:mx.remoting.NetServiceProxy;
//put the controls in scope to avoid calling _root
var locid = locdata.selectedItem.locid;
var loc_name = loc_nameB.text;
var loc_address = loc_addressB.text;
var loc_city = loc_cityB.text;
var loc_state = loc_stateB.text;
var loc_zipcode = loc_zipcodeB.text;
var loc_phone = loc_phoneB.text;
var loc_manager = loc_managerB.text;
var loc_hours = loc_hoursB.text;

//make an object that will handle the response
var responseHandler = {};
//function that receives the response
responseHandler.onResult = function( results: String ):Void {
//when results are back, we show the text received
mx.controls.Alert.show(String(results));
}
//function that receives any error that may have occurred during the call
responseHandler.onStatus = function( stat: Object ):Void {
//if there is any error, show an alert
alert("Error while calling cfc:" + stat.description);
}
myService = connection.getService("otgadmin.cfc.locationsCom",
responseHandler );
//make call, passing one parameter

myService.updLoc(locid,loc_name,loc_address,loc_city,loc_state,loc_zipcode,loc_p
hone,loc_manager,loc_hours);

}
</cfsavecontent>
Re: CFGRID Refresh/Reload ws_richland
9/6/2007 9:41:44 PM
This seems available in CF8, but Adobe won't say how to work it in CF7:

http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=JavaScriptFcns
_06.html
Best of luck, I am looking for this as well. I think Adobe just wants to make
CF7 disappear since they released half baked concepts that didn't pull through.
AddThis Social Bookmark Button