From 4f16e9dfa66ffd8d137af5cd969692c1274f17d6 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Wed, 3 Dec 2014 15:06:27 +0000 Subject: [PATCH] Fixed gwt 2.6 Element git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-expression-widget@101860 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../td/expressionwidget/client/custom/IconButton.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/custom/IconButton.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/custom/IconButton.java index d2703dc..fdb2eef 100644 --- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/custom/IconButton.java +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/client/custom/IconButton.java @@ -1,6 +1,7 @@ package org.gcube.portlets.user.td.expressionwidget.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; @@ -9,6 +10,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); }