I am using GWT MVP II (with the UiBinder) and I have a question. Let's say I have a widget, which consist of:
CoolButtonView.ui.xml - xml for UiBinder
CoolButtonView.java - view's interface
CoolButtonViewImp.java - implements the CoolButtonView.java and contains a reference into CoolButtonPresenter
CoolButtonPresenter.java - presenter's interface
CoolButtonPresenterImpl.java - implement the CoolButtonPresenter and contains a reference into CoolButtonView
I am trying to use it inside the other widgets xml via an interface like this: < r:CoolButtonView ui:field="myButton" />, but I am getting an error:
Invoking generator com.google.gwt.uibinder.rebind.UiBinderGenerator
Not allowed in an HTML context Element
<r:CoolButtonView ui:field='CoolButtonView' />
However if I use my widget via the view, everything is good: < r:CoolButtonViewImpl ui:field="myButton" /> But I think that this isn't correct.
Should I use an interface inside the xml-files? And if I should, what is a correct way?