public class MyPanel extends AbsolutePanel implements HasClickHandlers {
    public MyPanel (Element elem) {
            super(elem.<com.google.gwt.user.client.Element> cast());
            onAttach();

    }

    @Override
    public HandlerRegistration addClickHandler(ClickHandler handler) {
            return addDomHandler(handler, ClickEvent.getType());
    }
}


//Some Widget
 HTMLPanel contentHtmlPanel = new HTMLPanel("Hello <a
href=\"#world\">World</a>");



                    MyPanel p = new MyPanel (contentHtmlPanel.getElement());
                 p.addClickHandler(new ClickHandler() {
                         @Override
                         public void onClick(ClickEvent event) {
                          GWT.log("Hello World");
                         }
                       });




//Logic to mainuplate elemts inside a text area
com.google.gwt.dom.client.Text text =
 txt.getParentElement().replaceChild(Element.as(p.getElement()), txt);

The Click handler works on Firefox but in IE the click handler is not
getting attched .

-- 
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-toolkit@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