I'm trying to populate a data grid from the click handler of a button.
My code looks like this:
callHistory_pb.populateGrid = function()
{
contractService.getCallHistory(historyResponder,contracts_lb.getSelectedItem().label);
}
historyResponder.onResult(history_rs)
{
callLog_dg.alternateRowColors(0xCCCCCC,0xFFFFFF);
callLog_dg.setDataProvider(history_rs);
}
callHistory_pb.setClickHandler("populateGrid",callHistory_pb);
I keep getting the following error --> "NetServices warning 3: There is no defaultResponder, but no responder was given in call to getCallHistory".
Any thoughts on why I am getting this message? These code fragments have worked for populating other components.
Yashnoo - 27 Jan 2004 04:36 GMT
Could you get the data finally? Are you sure that you have a method "getCallHistory" on the server?
It is maybe your Remoting version is old or don't complicate with your Flash Version? I use FlashMX2004Pro and can get data from MySQL no problem.
Niemo - 27 Jan 2004 17:12 GMT
I finally got it to work. I am using MX not MX 2004. So, this may be part of the problem.
I changed my getService() call from -->
var contractService = net_conn.getService(servicePath)
to --> var contractService = my_conn.getService(servicePath,this);
Then I changed the way that I was dealing with responder functions. So the code above got changed to this:
callHistory_pb.populateGrid = function()
{
var thisContract = contract_txt.text;
contractService.getCallHistory(thisContract);
}
function getCallHistory_Result(result_rs)
{
callLog_dg._visible = true;
callLog_dg.setVScroll(true);
callLog_dg.alternateRowColors(0xCCCCCC,0xFFFFFF);
callLog_dg.setDataProvider(result_rs);
status_cb._visible = true;
update_pb._visible = true;
}
In the end, I really did not need to explicitly create the responder objects.
Thanks for your reply. I appreciate it.
Joe