code: public static AsyncCallback<String> wrapCallback(final JavaScriptObject func) {
  
          return new AsyncCallback<String>() {
  
              public void onFailure(Throwable caught) {
  
                  // TODO Auto-generated method stub
  
              }
  
              public void onSuccess(String result) {
  
                  callWithString(func, result);
              }
  
          };
      }
docs: Wraps a native JavaScript callback taking a string argument into an AsyncCallback so that it can easily be called from GWT Java code.<p>
  
  @param func the function to wrap
  @return the AsyncCallback wrapper