diff --git a/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButton.java b/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButton.java index 9b0b48b..8d6d6dd 100644 --- a/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButton.java +++ b/src/main/java/org/gcube/portlets/user/td/unionwizardwidget/client/custom/IconButton.java @@ -2,6 +2,7 @@ package org.gcube.portlets.user.td.unionwizardwidget.client.custom; import com.google.gwt.core.client.GWT; +import com.google.gwt.dom.client.Element; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.event.dom.client.HasClickHandlers; @@ -10,6 +11,7 @@ import com.google.gwt.resources.client.ImageResource; import com.google.gwt.safehtml.shared.SafeHtmlBuilder; import com.google.gwt.user.client.Event; import com.sencha.gxt.core.client.dom.XDOM; +import com.sencha.gxt.core.client.dom.XElement; import com.sencha.gxt.widget.core.client.Component; /** @@ -31,8 +33,10 @@ public class IconButton extends Component implements HasClickHandlers { SafeHtmlBuilder sb = new SafeHtmlBuilder(); this.appearance.render(sb); - - setElement(XDOM.create(sb.toSafeHtml())); + + XElement element=XDOM.create(sb.toSafeHtml()); + setElement((Element)element); + sinkEvents(Event.ONCLICK); }