ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY states the following:
"Only visit resources that are top level views, i.e. views that can be used to serve a request as opposed to those that can only be used for includes."
The behavior between MyFaces and Mojarra is quite a bit different and I believe some clarification is needed in the specification.
MyFaces getViewResources( call with ResourceVisitOptions )
/index.xhtml /depth2/index.xhtml
MyFaces getViewResources( call without ResourceVisitOptions )
/index.xhtml /test /depth2/index.xhtml
In summary:
In MyFaces if we use the ResourceVisitOptions then we filter out any views that don't contain a valid suffix ( in the above case /test ). In addition MyFaces never returns any views in WEB-INF and META-INF
In Mojarra if we use the ResourceVisitOptions then anything in WEB-INF and META-INF is not included. In addition Mojarra never returns any views without a valid suffix.
ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY states the following:
"Only visit resources that are top level views, i.e. views that can be used to serve a request as opposed to those that can only be used for includes."
The behavior between MyFaces and Mojarra is quite a bit different and I believe some clarification is needed in the specification.
Take the following application for example:
testApplication
Mojarra getViewResources( call with ResourceVisitOptions ) /index.xhtml /depth2/index.xhtml
Mojarra getViewResources ( call without ResourceVisitOptions ) /index.xhtml /depth2/index.xhtml META-INF/index.xhtml WEB-INF/index.xhtml
MyFaces getViewResources( call with ResourceVisitOptions ) /index.xhtml /depth2/index.xhtml
MyFaces getViewResources( call without ResourceVisitOptions ) /index.xhtml /test /depth2/index.xhtml
In summary:
In MyFaces if we use the ResourceVisitOptions then we filter out any views that don't contain a valid suffix ( in the above case /test ). In addition MyFaces never returns any views in WEB-INF and META-INF
In Mojarra if we use the ResourceVisitOptions then anything in WEB-INF and META-INF is not included. In addition Mojarra never returns any views without a valid suffix.