1
我正在使用GWTP的項目,我想知道如果我可以注入一個視圖的對象到另一個視圖。例如:GWTP - 在另一個視圖中注入小部件
public class BarView extends ViewWithUiHandlers<BarUiHandlers> implements BarPresenter.BarView {
public interface Binder extends UiBinder<HTMLPanel, BarView> {
}
@UiField SomeWidget someWidget;
@Inject
public PlayerView(Binder binder) {
initWidget(binder.createAndBindUi(this));
}
}
public class FooView extends ViewWithUiHandlers<FooUiHandlers> implements FooPresenter.FooView {
public interface Binder extends UiBinder<HTMLPanel, FooView> {
}
SomeWidget someWidget;
@Inject
public PlayerView(Binder binder, SomeWidget someWidget) {
initWidget(binder.createAndBindUi(this));
this.someWidget = someWidget;
}
}
會這樣嗎?有人知道如何實現這一目標嗎?
工作就像一個魅力!只需跟進:https://groups.google.com/forum/#!topic/gwt-platform/UqkpOmhO3kc –