Hello guys,
i need your help,
im doing Model Driven Development and want to know if there is a way to call a service method Synch NOT Asynch.
All the calls are Asynch.
"
var funcionarioToken:AsyncToken = new FuncionarioService().getAll();
funcionarioToken.addResponder(new AsyncResponder(
function (event:ResultEvent, token:Object=null):void
{
_funcionarioInput.dataProvider = event.result;
},
function (event:FaultEvent, token:Object=null):void
{
Alert.show("Associated service call failed: " + event.fault.faultString, "Error");
}));
"
Is there a way to define the return type of the service calls, for exemple , if i want to fetch a single row from a database table by its ID how would i do?
var myVar:MyObjectType = event.result as MyObjectType; ??????
regards
Imraan
Solved! Go to Solution.
Views
Replies
Total Likes
Just as you are specifying a "fill", you can specify a "get-item" that takes an identifier and returns a single item.
Client side doc is here:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/data/DataService.html
Views
Replies
Total Likes
You could write your own code to simulate it, but everything in Flash is asyncronous.
Tom
Hello Tom,
thanks for the reply.
But what about returning a single object rather than a Arraycollection?
Regards
Imraan
Views
Replies
Total Likes
Sorry, everything in Flash/Actionscript is async, even though it would be nice sometimes if it wasn't.
Tom
Views
Replies
Total Likes
Just as you are specifying a "fill", you can specify a "get-item" that takes an identifier and returns a single item.
Client side doc is here:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/data/DataService.html
Views
Replies
Total Likes
thanks for the reply.
Regards
Imraan
Views
Replies
Total Likes
oops, sorry I was still stuck on Async and you were asking about getItem().
Tom
Views
Replies
Total Likes
its OK Tom.
at least you answered
Regards,
Imraan
Views
Replies
Total Likes
Views
Likes
Replies