The following code returns "null" the first time it is run, and then
returns the previous request on the second time it is called.... can
anyone see whats going wrong? Surely it should wait until it gets the
server response before returning a value? or am I missing the point
here?
private String GetOneContact(String Name) {
//ContactService = GWT.create(ContactService.class);
ContactService.getoneContact(Name,new AsyncCallback<String>()
{
public void onFailure(Throwable error) {
PhoneResult="ERROR";
}
public void onSuccess(String Phone) {
PhoneResult=Phone;
}
});
return (Phone);
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en
-~----------~----~----~----~------~----~------~--~---