package org.rsos.openbill.command { /* add to controller addCommand( FpEvent.EVENT_FP, FpCommand ); */ import com.adobe.cairngorm.commands.ICommand; import com.adobe.cairngorm.control.CairngormEvent; import mx.controls.Alert; import mx.core.Application; import mx.rpc.IResponder; import mx.rpc.events.FaultEvent; import org.rsos.openbill.business.RailsDelegate; import org.rsos.openbill.event.FpEvent; import org.rsos.openbill.model.OpenbillModelLocator; import org.rsos.openbill.vo.UserVO; public class FpCommand implements ICommand, IResponder { public function execute(event:CairngormEvent):void { var delegate : RailsDelegate = new RailsDelegate( this ) delegate.fp(FpEvent(event).data) } public function result(data:Object):void { var model : OpenbillModelLocator = OpenbillModelLocator.getInstance(); model.userVO = new UserVO(); model.askforlogin(Application.application); Alert.show( "Password has been reset and instructions sent." ); } public function fault(info:Object):void { var faultEvent :FaultEvent = FaultEvent( info ); Alert.show( "fault at fp" ); } } }