Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Can I Wait for RPC service?

    I have this code, which sends a call to the server. This call takes a few seconds to complete.
    I should not run System.out.println until the call ends.


    I do this? How I wait for the server?
    thanks

    Code:
    String value="nothing";
    BDServiceAsync service = GWT.create(BDService.class);
    	service.myCall("text", new AsyncCallback<Map<String,String>>(){
    		
    		public void onFailure(Throwable caught) {
    
    		}
    
    		public void onSuccess(Map<String,String> result) {
    			// This takes a few seconds to complete. 
                                            value="hola";
    
    		
    		}
    	});
    
    // should wait for the call to the server
    System.out.println("value="+value);

    #2
    I have the same problem. Does smart gwt cater for this?

    Comment

    Working...
    X