tags:

views:

502

answers:

2

Hi

I want to add ClickHandler to the < li> tag

please help me ...

+1  A: 

You could use a FocusWidget once you've got hold of the Element. There's a FocusWidget constructor taking a single Element. After that you can just call addClickHandler

jrydberg
can u please give me the example
Tushar Ahirrao
FocusWidget w = new FocusWidget(liElement); w.addClickHandler(new ClickHandler() { ... }); should work. Remember to add the Widget to your panel. liElement is a freshly created LI-element.
jrydberg
+1  A: 

You need to have the <li> tag as a widget that implements the HasClickHandler interface. Then you can instantiate a ClickHandler and add it to the <li> widget.

Iker Jimenez