Bom Dia,
como faço para manipular quando recebo uma classe Usuario.java(desrita
abaixo) recebida pelo GranitDS, abaixo segue logicas usadas na
tentativa bem como o erro recebido:
logica do result:
private function onRetornaUsuario(event:ResultEvent):void{
var usuario:Object = Object(event.result);
mx.controls.Alert.show(usuario.getNome());
}
Classe usuario no java:
package test.pojo;
public class Usuario {
private int id;
public String nome;
private String sobreNome;
public Usuario(int id, String nome, String sobreNome) {
setId(id);
setNome(nome);
setSobreNome(sobreNome);
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
public String getSobreNome() {
return sobreNome;
}
public void setSobreNome(String sobreNome) {
this.sobreNome = sobreNome;
}
}
Erro recebido:
TypeError: Error #1010: A term is undefined and has no properties.
at mx.utils::ObjectProxy/http://www.adobe.com/2006/actionscript/flash/
proxy::callProperty()
at Counter/::onRetornaUsuario()
at Counter/__srvHelloWorld_result()
at flash.events::EventDispatcher/
flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.rpc::AbstractService/dispatchEvent()
at mx.rpc.remoting.mxml::RemoteObject/dispatchEvent()
at mx.rpc::AbstractOperation/http://www.adobe.com/2006/flex/mx/
internal::dispatchRpcEvent()
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/
internal::resultHandler()
at mx.rpc::Responder/result()
at mx.rpc::AsyncRequest/acknowledge()
at ::NetConnectionMessageResponder/NetConnectionChannel.as
$40:NetConnectionMessageResponder::resultHandler()
at mx.messaging::MessageResponder/result()
se alguem poder me ajudar...
Desde já, Obrigado.
Sandro Mueller
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---