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 google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to