What's the best practice to add a ClickHandler in GWT to an Element?

For example, I have a <ul> with multiple <li> Elements inside, and I
need to take an action based on which li is clicked. (It would also be
best if other widgets could listen for those events, since I'm using
this to make tabs but may also use it for other navigation structures
in the future, and I'm not 100% clear on GWT's sink/source model)

Putting the ClickHandler on the ul would probably be the most
efficient, but I'm also fine with putting the ClickHandler directly on
the li or making a li widget that implements HasClickHandlers if those
don't cause too much of a performance hit. I'm just curious what the
best way to do this is.

Thanks!

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

Reply via email to