Hi,
Just do something like that:
abstract public class AsyncCall implements AsyncCallback {
public void onFailure(Throwable t){
}
public void onSuccess(Object result) {
}
abstract public void execute();
};
then an RPC call is like :
new AsyncCall(){
public void execute(){
myapp.myfunc(this); // The RPC call, where 'this' is the
AsyncCallback that must be passed to the RPC call
}
}.execute();
Yves
On Feb 15, 1:59 pm, walden <
wmath...@aladdincapital.com> wrote:
> Yes, except that RPC calls use AsyncCallback. So just create a dummy
> one of those that does like the code below.
>
> WM
>
> On Feb 15, 3:37 am, blissteria <
blisste...@hotmail.com> wrote:
>
>
>
> > HI
>
> > IMHO walden meant
>
> > RequestCallback dummyCallBack = new RequestCallback(){
> > public void onError(Request request, Throwable exception) {
> > }
> > public void onResponseReceived(Request request, Response response)
> > {
> > }
> > };
>
> > rb.sendRequest("request", dummyCallBack);
>
> > On 15 fév, 08:28, "
zhch...@gmail.com" <
zhch...@gmail.com> wrote:
>
> > > er, Walden, thx for the replying, but what do mean by drop the
> > > response?
>
> > > if I understand correctly, GWT rpc mechanism doesn't allow RPC without
> > > a callback, I wonder whether there is any work around.
>
> > > On Feb 12, 9:19 pm, walden <
wmath...@aladdincapital.com> wrote:
>
> > > > Just drop the response on the floor, and no one will be the wiser.
> > > > Bits, unlike buttered andjelly'd bread, don't really make a mess when
> > > > you drop them. :-)
>
> > > > On Feb 12, 12:24 am, "
zhch...@gmail.com" <
zhch...@gmail.com> wrote:
>
> > > > > Hi guys,
>
> > > > > I wonder is it possible to create anRPCwithoutcallback?
>
> > > > > I imagine to use this while I am closing the window, I dont need
> > > > > server response, I simply let server know that he should clean up some
> > > > > session data.- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -