categoryData_con.trigger();
initialized = true;
}
}
// updateDetails will update the details TextArea, textInput and the
// Loader present on the screen changes will be updated when the selection
// in DataGrid changes
function updateDetails()
{
var curItem:Object = customers_grd.selectedItem;
custInfo_txt.text = curItem.Details;
totalSales_label.text = curItem.TotalSales;
custLogo_ldr.contentPath = curItem.Logo;
custLogo_ldr.load();
custLogo_ldr._visible = true;
}
// updates the detail section when a new item is selected in the grid
function onCustGrid_Change( eventObj: Object ):Void {
mx.remoting.debug.NetDebug.trace({ level:"Debug",
message:"onCustGrid_Change" });
eventObj.target._parent.updateDetails();
}
// handles the result of the call to the getCustomers() service function
function onCustomerData( re:Object ):Void {
_parent.customers_grd.selectedIndex = 0;
_parent.updateDetails();
}
// handles the results from the getCategories() call. It executes the
// binding which will force the customer data connector to fire and get the
// appropriate customers for the currently selected category.
function onCategoryData( re:Object ):Void {
_parent.customerData_con.refreshFromSources();
}
// handles the display of the fault information related to the customer data
// request to the user
function onCustomerDataFault( status:Object ):Void {
// notify the user of the problem
if( status.code == "fault" ) {
Alert.show( "Couldn't retrieve customer data.", "Error",
Alert.OK, this );
mx.remoting.debug.NetDebug.trace({level:"None",
message:"There was a problem: " + status.data.faultstring });
}
}
Using the RemotingConnector in the CustomerInfoExampleCon application
59
Need help?
Do you have a question about the FLASH REMOTING MX-USING FLASH REMOTING FOR FLASH MX 2004 ACTIONSCRIPT 2.0 and is the answer not in the manual?
Questions and answers