Because your request is asynchron and your JSNI code does not wait at the
$wnd.$.get call. Your method will complete immediately and return nothing
as it does not have a return statement.
You would need to change your getData() method to something like:
public native void getData(String trainerName, Callback callback)/*-{
$wnd.$.get( "http://testdastuff.dev/trainerstats", { trainer: trainerName}
)
.fail(function() {
[email protected]::onFail()();
})
.done(function( data ) {
[email protected]::onSuccess(Ljava/lang/String;)(data);
});
}-*/;
-- J.
--
You received this message because you are subscribed to the Google Groups "GWT
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.