Reputation: 35282
I'm trying to wrap a ButtonElement into a Button:
@UiField ButtonElement myButton;
Button theButton = Button.wrap(myButton);
However, I am getting this error:
@UiField myButton, template field and owner field types don't match: com.google.gwt.dom.client.ButtonElement is not assignable to com.google.gwt.user.client.ui.Button
Upvotes: 0
Views: 80
Reputation: 18331
This means that while you have a ButtonElement
in your java code, the uibinder tag with the name "myButton" is actually a Button
widget, not a ButtonElement
elt.
Change the uibinder to actually use a <button>
, or change the @UiField
to be a Button (and drop the wrap(...)
call).
Upvotes: 2