How can I show load widget, when client send json on server.
From example in GWTP exmaple I found such method
/**
* We display a short lock message whenever navigation is in progress.
*
* @param event The {@link LockInteractionEvent}.
*/
@ProxyEvent
public void onLockInteraction(LockInteractionEvent event) {
getView().setLoading(event.shouldLock());
}
How do I show in the loading resty-gwt, when it sent the request? Can I use onLockInteraction with resty-gwt?
You can use RestyGWT custom Dispatcher to track request lifecycle. Dispatcher can be configured manually or using annotations (https://resty-gwt.github.io/documentation/restygwt-user-guide.html). Example setting it manually:
Instead of logging, you can send an event using the eventBus, and use this event to keep track of the number of active request, and finally show a loading indicator if the number of active request is grater than 0.