Say you've got a value object (VO) and you have defined a remote class alias on it. You can change(add?) another alias dynamically at runtime.
When you perform the execution of a service call.eg [RemoteClass(alias="lf.Project.Service.ServiceProxy.ObjectivesServiceProxy.StoreCluster")] on the class com.fasanya.application.vo.StoreClusterVO.To change this at runtime particularly useful if the same VO is used by different services you can do this...public function execute(event:CairngormEvent):void //often done in this method of a command
{ var clientClassName:String = 'com.fasanya.application.vo.StoreClusterVO'; var clientClass:Class = getDefinitionByName(clientClassName) as Class; var newAlias:String = ''lf.Project.NewService.NewServiceProxy.NewServiceProxyName.StoreCluster"; registerClassAlias(newAlias, clientClass); ...other code... delegate.serviceRequest(clientClass);
}
When you perform the execution of a service call.eg [RemoteClass(alias="lf.Project.Service.ServiceProxy.ObjectivesServiceProxy.StoreCluster")] on the class com.fasanya.application.vo.StoreClusterVO.To change this at runtime particularly useful if the same VO is used by different services you can do this...public function execute(event:CairngormEvent):void //often done in this method of a command
{ var clientClassName:String = 'com.fasanya.application.vo.StoreClusterVO'; var clientClass:Class = getDefinitionByName(clientClassName) as Class; var newAlias:String = ''lf.Project.NewService.NewServiceProxy.NewServiceProxyName.StoreCluster"; registerClassAlias(newAlias, clientClass); ...other code... delegate.serviceRequest(clientClass);
}
2 comments:
Great
I was looking for the same..
instead of registering from event I done it from application initialization..
thanks...
Yes. Really great work, just I got this problem and your post helps me.
Thanks!
Post a Comment