Rajesh
Rajesh

Reputation: 213

public void onSuccess(String result), from where/how the result is being set?

I've tried to follow the GWT RPC sample codes, and i don't understand how the AsyncCallback's Onsuccess method result is being set. Anyone help me to understand the flow.

Thanks.

Upvotes: 0

Views: 895

Answers (2)

RAS
RAS

Reputation: 8158

@Rajesh, I'm providing a link here. I hope this may help you.

Upvotes: 0

kapandron
kapandron

Reputation: 3671

AsyncCallback<YourReturnType> callback = new AsyncCallback<YourReturnType>() {
    @Override
    public void onSuccess(YourReturnType result) {
        //to do something with the result
    }
    @Override
    public void onFailure(Exception ex) {
       //to do something with exceptions
    }
}

Upvotes: 2

Related Questions