El lunes, 29 de octubre de 2012 21:46:34 UTC+1, Jens escribió:
>
> When you create two HelloWorld widgets each of them receives its own 
> events. If you use @UiHandler in your UiBinder widget and you want to stop 
> receive events for a widget without removing the widget itself from the 
> parent (for whatever reason) you have to "disable" your @UiHandler 
> implementation.
>
> So you would end up having
>
> @UiHandler(...)
> void onEvent(...) {
>   if(handleEvents) {
>      //do your event logic
>   }
> }
>
> or you use a Delegate interface that a class can implement and that 
> contains your event logic implementation:
>
> @UiHandler(...)
> void onEvent(...) {
>   if(delegate != null) {
>      delegate.onEvent();
>   }
> }
>
> In that case you would disable your events by nulling your delegate: 
> widget.setDelegate(null)
>
>
> Otherwise you have to remove the widget from the parent.
>
>
> -- J.
>


Thanks for you answer. 
But  "to remove the widget from the parent." doesn`t avoid to receive 
events ( or my tests were wrong )

-- 
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/-/IVFyiGlLNL0J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to