I have multiple entry points in the same module.
For example I have an Home entry point for the home page and an Admin entry point for the admin page.
<entry-point class='com.company.project.client.HomeModule'/>
<entry-point class='com.company.project.client.AdminModule'/>
The way I am setup now - I need to check somt like this in my OnModuleLoad:
if((RootPanel.get("someHomeWidget")!=null)&&
(RootPanel.get("someOtherHomeWidget")!=null))
{
// do the stuff
}
in order the the Admin Entrypoint not to be executed when the Home page gets open and the other way around.
Not doing the check above also involves that if I have a div with the same name in both the Home and Admin page whatever I am injecting in it shows up twice on each of them.
This stinks 1000 miles away and is obviously wrong: what's the correct way to do this in people experience?
Any help appreciated!