-
1. Re: Errai UI with GWT
mbarkley Nov 2, 2016 12:14 PM (in response to ntroncoso)Hi Noah,
You are seeing the JS equivalent of a NullPointerException because the "applicationContainer" field is null. The root cause of your problem is that your EntryPoint is being created by GWT and not by Errai's dependency injection container.
Most people use the container to manage the entire lifecycle of their application, in which case you can annotate a bean with @EntryPoint and one of it's methods with @PostConstruct to have that code run when the container is ready. If you do not want to do that, then you will need to use the bean manager to lookup your templated bean dynamically. Here is an example usage of the bean manager API from a test.
The next issue you will run into, is that you will need to wait for the bean manager to finish initializing before calling it. You can do this with Errai's InitVotes class by registering a one time initialization callback with this method.
Hope that helps.