Hello,

My imports:
import net.customware.gwt.dispatch.client.DispatchAsync;
import net.customware.gwt.dispatch.client.standard.StandardDispatchAsync;

My dispatcher:
private final static DispatchAsync dispatch   = new StandardDispatchAsync( 
new DefaultExceptionHandler() );

Execute the server call:
dispatch.execute( new MyAction(), new AsyncCallback< MyResult >()
    {
      @Override
      public void onFailure( Throwable caught )
      {
        ExceptionHelper.forceHandleException( caught );
      }

      @Override
      public void onSuccess( MyResult result )
      {
       // do something
      }
    } );

Normally the dispatcher calls the server the page is loaded from.
To wrap the application with Phonegap I need to change that url, because 
the files are loaded from the device and the call must be done to a server.



On Thursday, February 14, 2013 10:47:18 AM UTC+1, Jens wrote:
>
> What is "the dispatcher"? If its a GWT-RPC service you could hard cast it 
> to ServiceDefTarget to change its target URL at runtime:
>
>
> http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/user/client/rpc/ServiceDefTarget.html
>
>
> -- J.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to