I need to add an Anchor with a specific ClickHandler into an Element. But the onClick(...) method of my Anchor is never called.
How can I fix that?
Element th = DOM.createTH();
Anchor link = new Anchor();
link.setText("my link");
link.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
Window.alert("Clicked!");
}
});
th.appendChild(link.getElement());