Brother...não faça o acesso ao seu back-end no sua entidade, nela você
Só "molda" seu objeto. Ele não deve se encarregar de fazer a
O acesso ao back-end.

Pra isso crie uma classe AS "proxy", "service", etc.

> -----Mensagem original-----
> De: [email protected] 
> [mailto:[EMAIL PROTECTED] Em nome de Besse
> Enviada em: quinta-feira, 5 de junho de 2008 14:14
> Para: flexdev
> Assunto: [flexdev] Re: Como fazer para uma classe disparar um evento
> 
> 
> o único problema é que minha classe jah esta extendendo outra 
> eu gostaria de que a classe disparasse um evento e eu 
> tratasse ele em um arquivo mxml do flex para poder pegar uma 
> lista de array.
> 
> package br.com.EduLink.view.entity
> {
>       import mx.collections.ArrayCollection;
>       import mx.controls.Alert;
>       import mx.rpc.events.FaultEvent;
>       import mx.rpc.events.ResultEvent;
>       import mx.rpc.remoting.RemoteObject;
> 
>               [RemoteClass(alias="br.com.EduLink.model.entity.Aluno")]
>               [Bindable]
>               public class Aluno extends Pessoa
>               {
> 
>                       public var txReg_Nasc:String;
>                       public var txNaturalidade:String;
>                       public var txUf_Rg:String;
>                       public var txRaca:String;
>                       public var idEscola:int;
>                       public var idClasse:int;
>                       public var inEspera:int;
>                       public var listaEspera:int;
>                       public var matriculado:int;
> 
>                       private var alunoService:RemoteObject;
> 
>               private var listaAlunos:ArrayCollection = new 
> ArrayCollection();
> 
>                       public function Aluno():void{
> 
>                               alunoService = new 
> RemoteObject("alunoService");
>                               alunoService.destination="alunoService";
>                               
> alunoService.onFault.addEventListener(FaultEvent.FAULT,
> onFault);
>                               
> alunoService.findByName.addEventListener(ResultEvent.RESULT,
> onResultGetList);
>                               
> this.addEventListener(ResultEvent.RESULT, onResultGetList);
> 
>                       }
> 
> 
>                       public function aluFindByName(nome:String):void{
> 
>                                       alunoService.findByName(nome);
>                       }
> 
>                       private function 
> onResultGetList(event:ResultEvent):void {
> 
>       
> alunoService.removeEventListener(ResultEvent.RESULT,onResultGetList);
>                               listaAlunos = event.result as 
> ArrayCollection;
> 
>                       }
> 
>                       public function getList():void
>                       {
>                               alunoService.getList();
> 
>                       }
> 
>                       public function onFault(event:FaultEvent):void
>                       {
>                               Alert.show(event.fault.message);
>                       }
> 
> 
>               }
> 
> 
> }
> 
> > 
> 

--~--~---------~--~----~------------~-------~--~----~
Você recebeu esta mensagem porque está inscrito na lista "flexdev"
Para enviar uma mensagem, envie um e-mail para [email protected]
Para sair da lista, envie um email em branco para [EMAIL PROTECTED]
Mais opções estão disponíveis em http://groups.google.com/group/flexdev
-~----------~----~----~----~------~----~------~--~---

Responder a