Java faces-config how to check unused navigation rules?

40 Views Asked by At

Is there a efficient way to find unused navigation rules in faces-config due to pages removed or outcome never fired?

Thank you in advance.

1

There are 1 best solutions below

0
volosied On

I'm not aware of anything within the JSF API/Impl that can accomplish that for you.

However, you can enable logging and keep track of the different navigation cases used.

For example, MyFaces logs the following line from NavigationHandlerImpl#handleNavigation:

 fromAction=#{bean.doSomething} outcome=someMapping toViewId =/faces/somePage.xhtml redirect=false

You could then collect those logs and figure out which nagivations are not used.