Issue with page navigation
hr.stoyanov Jun 1, 2017 9:35 PMHi all,
In the attached code Errai 4 (latest from github) seem to not instantiate the default Home page and page graph seems empty. Any idea why? I suspect something is wrong with how the navigation panel is initialized, but it all look good in Chrome inspector. If I try to force the page to show up:
@AfterInitialization
private void afterInitialization() {
RestClient.setApplicationRoot("/rest");
Body body = getDocument().getBody();
body.appendChild(topNavigationBar.getElement());
body.appendChild(mobileNavigationBar.getElement());
navigationPanel.getElement().setId("pageContainer");
navigationPanel.getElement().addClassName("uk-container uk-container-expand");
//Effectively, adding the nav panel as last element in the body.
RootPanel.get().add(navigationPanel);
//force Home page to show up
home.go();
}
...I get this:
========================
Exception: org.jboss.errai.ui.nav.client.local.api.PageNotFoundException: There is no page of type com.recres.web.gwt.client.home.Home in the navigation graph.
ConsoleLogger.java:32 Error: org.jboss.errai.ui.nav.client.local.api.PageNotFoundException: There is no page of type com.recres.web.gwt.client.home.Home in the navigation graph.
at Rbj_g$.uC_g$ [as createError_0_g$] (Throwable.java:121)
at Rbj_g$.EC_g$ [as initializeBackingError_0_g$] (Throwable.java:113)
at Rbj_g$.nC_g$ (Throwable.java:67)
at Rbj_g$.TC_g$ (Exception.java:29)
at Rbj_g$._C_g$ (RuntimeException.java:29)
at Rbj_g$ (PageNotFoundException.java:28)
at K8i_g$.V8i_g$ [as goTo_0_g$] (Navigation.java:261)
at Xaj_g$.Zaj_g$ [as callback_15_g$] (TransitionTo.java:95)
at Xaj_g$.Yaj_g$ [as callback_8_g$] (TransitionTo.java:94)
at MNi_g$.ONi_g$ [as getInstance_4_g$] (SyncToAsyncBeanManagerAdapter.java:129)
at Raj_g$.Taj_g$ [as go_1_g$] (TransitionTo.java:91)
at Raj_g$.Saj_g$ [as go_0_g$] (TransitionTo.java:74)
at fuf_g$.guf_g$ [as afterInitialization_0_g$] (Main.java:46)
at HAi_g$ (Type_factory__c_r_w_g_c_Main__quals__j_e_i_Any_j_e_i_Default.java:88)
at NAi_g$.OAi_g$ [as run_5_g$] (Type_factory__c_r_w_g_c_Main__quals__j_e_i_Any_j_e_i_Default.java:40)
at ESh_g$.FSh_g$ [as run_5_g$] (InitVotes.java:427)
at ZRh_g$ (InitVotes.java:399)
at YRh_g$ (InitVotes.java:384)
at aSh_g$ (InitVotes.java:361)
at wSh_g$.xSh_g$ [as run_5_g$] (InitVotes.java:204)
at WSh_g$.aTh_g$ [as run_5_g$] (ClientTaskManager.java:90)
at kTh_g$.nTh_g$ [as run_5_g$] (ClientTaskManager.java:192)
at kTh_g$.lJb_g$ [as fire_0_g$] (Timer.java:135)
at Timer.java:139
at Zcc_g$ (Impl.java:239)
at adc_g$ (Impl.java:291)
at Impl.java:77
-
src.zip 312.7 KB