dbasch
|
 |
« on: January 14, 2009, 10:11:47 » |
|
Hi all and Cliff,
I often need to have a command execute against specific mediators. Is it incorrect to use notification typing in a command?
public class AddAssetCommand extends SimpleCommand implements ICommand {
override public function execute( note:INotification ):void { var newAssetVO:Asset = note.getBody() as Asset;
var mapInstanceUID:String;
// if we didn't get a map instance Id // then use all the viewable maps if (note.getType() != null) { mapInstanceUID = note.getType(); } else { var mapProxy:MapProxy = facade.retrieveProxy("MapProxy") as MapProxy; for each (var mapItem in mapProxy.mapCollection) { facade.sendNotification(ApplicationFacade.ADD_ASSET_CMD, newAssetVO, mapItem.mapUIComponent.map.name); } return; }
|