I missed this question on IRC before leaving the office yesterday. But it's a good one, and something I think we should fix in 2.2:




w0mbat

hey, I am again playing with errai, errai ui and errai navigation. what i did was, I defined an @EntryPoint annotated class in my application which only adds the Navigation Panel to the RootPanel as specified here:https://docs.jboss.org/author/display/ERRAI/Errai+UI+Navigation

6:11



w0mbat

 

The I have an IndexPage annotated @Templated("index.html") @Page(startingPage = true)



6:12



w0mbat


and a LoginPage annotated @Templated("index.html") @Page(path="login")



6:13



w0mbat


compiling works fine so war. as soon as I start "mvn gwt:run" i get: [ERROR] org.jboss.errai.ioc.client.container.IOCResolutionException: no matching bean instances for: at.w0mb.Sample.client.local.IndexPage



6:14



w0mbat


[ERROR]     at org.jboss.errai.ioc.client.container.IOCBeanManager.lookupBean(IOCBeanManager.java:475)



6:14



w0mbat


[ERROR]     at org.jboss.errai.ui.nav.client.local.spi.GeneratedNavigationGraph$2.content(GeneratedNavigationGraph.java:32)



6:14



w0mbat


[ERROR]     at org.jboss.errai.ui.nav.client.local.Navigation.makePageVisible(Navigation.java:80)



6:14



w0mbat


[ERROR]     at org.jboss.errai.ui.nav.client.local.Navigation.goTo(Navigation.java:67)


The problem is likely that w0mbat's @Page bean isn't explicitly marked with a CDI scope, so it's not available in IOCBeanManager.lookupBean(). Is there anything I can do at Errai Navigation rebind time to ensure implicitly scoped @Page beans are treated is if they were explicitly scoped @Dependent?

-Jonathan