Hi,

I'm using GWT 2.1.1 and I created a simple "li" widget in this way:

public class LIWidget extends Widget {

        public LIWidget() {
                super();
            setElement(Document.get().createLIElement());
        }

        public void addLink(String url, ClickHandler handler) {
                Anchor a = new Anchor(this.value, url);
                a.addClickHandler(new ClickHandler() {
                      public void onClick(ClickEvent event) {
                          Window.alert("fired");
                          }
                });
                getElement().appendChild(a.getElement());
        }

        // some other methods....
}

when this widget is created and a link is added using the method
addLink(...), everything is well displayed but when I click on the
link, the event is not fired (but the url on the bar change - it's
leaded by '#').
How can I fix the problem?

Thanks,
Julio

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
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