Problem with Website Embedding
Closed this issue · 0 comments
eugenbesel commented
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 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 ApplicationModule with
`bind(RootPresenter.class).to(MyRootPresenter.class).asEagerSingleton();`
If I dont 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.