La carga de los datos la realizo en el creationComplete de la segunda pantalla.
Código ActionScript :
public function init():void{
cargarDatos();
public function cargarDatos():void{
txtNroExpediente.text = this.datos.getIngresoParaEgresar().nroExp.toString();
txtReferenciaEgreso.text = this.datos.getIngresoParaEgresar().referencia;
}
Clase Singleton:
Código ActionScript :
public class Datos
{
[Bindable] private var ingresoParaEgresar: IngresoVO = new IngresoVO();
private static var instance: Datos;
public static function getInstance():Datos{
if (Datos.instance == null){
Datos.instance = new Datos();
}
return Datos.instance
}
public function getIngresoParaEgresar():IngresoVO{
return this.ingresoParaEgresar;
}
public function setIngresoParaEgresar(data: IngresoVO):void{
this.ingresoParaEgresar = new IngresoVO();
this.ingresoParaEgresar = data;
}
