GWT:方法“getInnerHTML”不适用

时间:2014-06-17 10:42:25

标签: gwt

行错误:

  @UiField Label label;
  //.......
  String labelHTML = label.getElement().getInnerHTML();

调试时检查元素错误:

  Method "getInnerHTML" with signature "()Ljava/lang/String;" is not applicable on this object.

StackTraceError:

  java.lang.IncompatibleClassChangeError: Found interface com.google.gwt.user.client.Element, but class was expected

调试时label.getElement()的值:

  <div class="GEOL43OC- GEOL43ONY"></div>

请帮忙。

0 个答案:

没有答案