2
Un problème étrange, quand j'injecte EventBus e a obtenu une exception. Le projet est gwt en utilisant mvpMVP GWT - problème d'injection EventBus
Voici l'exemple de code.
Gin
public interface AppGinjector extends Ginjector
{
EventBus getEventBus();
PlaceManager getPlaceManager();
}
Voici le point d'entrée
public class MvpEntryPoint implements EntryPoint
{
AppGinjector ginjector = GWT.create(AppGinjector.class);
public void onModuleLoad()
{
EventBus eventBus = ginjector.geEventBus();
HelloWorldPanel display = new HelloWorldPanel();
HelloWorldPresenter presenter = new HelloWorldPresenter(display, eventBus);
presenter.bind();
RootPanel.get().add(presenter.getDisplay().asWidget());
PlaceManager placeManager = ginjector.getPlaceManager();
placeManager.fireCurrentPlace();
}
i utilise gin 1.0, GWT-présentateur
Tout a une idée?
Merci
Edit:
L'exception est
ERROR: Deferred binding result type 'net.customware.gwt.presenter.client.EventBus' should not be abstract.
ERROR: Unable to load module entry point class com.gmgsys.mvpEntryPoint.client.MvpEntryPoint (see associated exception for details). java.lang.RuntimeException: Deferred binding failed for 'net.customware.gwt.presenter.client.EventBus' (did you forget to inherit a required module?)
...........................
aussi le gwt.xml
<!-- Specify the app entry point class. -->
<entry-point class='com.gmgsys.mvpEntryPoint.client.MvpEntryPoint'/>
<inherits name='net.customware.gwt.presenter.Presenter' />
<inherits name="com.google.gwt.inject.Inject" />
Vous avez raison! :) Merci les gars. – adgfs