Hello together,
I have a small GWTP App which uses gwt(2.8.0-beta1) and gwtp 1.5.2. this app should be embedded into another html page.
So I took a look into gwtp docu and implemented MyRootPresenter with:
public class MyRootPresenter extends RootPresenter {
private static final Logger LOG = Logger.getLogger(MyRootPresenter.class.getName());
public static final class MyRootView extends RootView{
@Override
public void setInSlot(Object slot, IsWidget content) {
LOG.info("enter SetInSlot in MyRootPresenter");
RootPanel.get("mainContent").add(content);
}
}
@Inject
public MyRootPresenter(EventBus eventBus, RootView view) {
super(eventBus, view);
}
}
and ClientModule withbind(RootPresenter.class).to(MyRootPresenter.class).asEagerSingleton();
I'm not sure, whether it works, because:
If I don't have any div element in my index.html with id = "mainContent", then I still can see my application. (I would expected, that some error occurs)
I add a log into the method setInSlot in MyRootPresenter und set a breakepoint, but neither log nor breakepoint fired. It seems for me, that the application don't go to the setInSlot.
Can you please tell me what should I do? I have also following code in my application:
RootPanel.get("mainContent").getElement().getAttribute("data-customerId");
on this point exception fired, that RootPanel.get("mainContent") doesnt exist.
thank you very much.
--
You received this message because you are subscribed to the Google Groups "GWTP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gwt-platform...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.