I am attempting to use Errai UI and Errai UI Navigation 3.0.0.Final to build a web site. I would like to determine the current page that is being viewed so that I can style the page navigation menus. I thought I could use navigation.getCurrentPage() to get the page name but this method is returning a null value (undefined via GWT logging). Navigation injection and the getContentPanel() method are working fine. I tried using both the @PostConstruct and @PageShowing annotations. I plan to use the Transitions but right now I am using static href values (i.e. <a href="#mypage" ....).
If you need to check which page is being displayed you should try the @PageShown method. Errai Navigation clears the navigation panel after the @PageHiding and then attaches the new page before @PageShown, meaning that @PageHidden and @PageShowing methods will run while there is no page attached.