Thursday, December 22, 2011

Re: firing httprequest multiple times

> how to over come step 2 behaviour and send only one http request for every click. 
Disable the widget during processing (which sinks/unsinks the click event). 
Hyperlink doesn't have this functionality per default, but you can use an other widget like a button that does have this.
You could extend the HyperLink widget and add a enabled property.
Almost all my widgets implement a HasEnabled interface that have this enabled property per default.

In the OnClick you will call widget.setEnabled(false)
In the OnResponseReceived call you will call setEnabled(true).

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/juIvd3oR0RgJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment