código após Gwt rpc AsyncCallbak não será executado?
Não consigo entender por que o código após o gct rpc AsyncCallback não será executado?
por exemplo, eu tenho a interface AppService estende RemoteService, Então eu vou ter AsyncAppService que faz a chamada assíncrona.
o seguinte código
AppServiceAsync service = GWT.create (AppService.class);
service.getCurrentUser(new AsyncCallback<Employee>(){
public void onFailure(Throwable caught) {
}
public void onSuccess(Employee result) {
currentUser = result;
}
});
// if i have the code after the above call, these code will not be execute, what is the problem
//code following will not be executed if they are in the same function.
boolean isAdmin = false;
if(currentUser!=null){
if(currentUser.getUserRole().equals("ROLE_ADMIN") ||
currentUser.getUserRole().equals("ROLE_MANAGER")){
isAdmin = true;
}
}
Obrigado pela sua explicação