[
https://issues.apache.org/jira/browse/MYFACES-4185?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Paul Nicolucci resolved MYFACES-4185.
-------------------------------------
Resolution: Fixed
> MYFACES-4183 causes an issue with getViews
> ------------------------------------------
>
> Key: MYFACES-4185
> URL: https://issues.apache.org/jira/browse/MYFACES-4185
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-372
> Affects Versions: 2.3.0-beta
> Reporter: Paul Nicolucci
> Assignee: Paul Nicolucci
> Fix For: 2.3.0
>
> Attachments: MYFACES-4185.patch
>
>
> Since the JSFViewDeclarationLanguageStrategy.java always returns true now :
> https://issues.apache.org/jira/browse/MYFACES-4183
> A issue is now found in the JSPViewDeclarationLanguage.getViews:
> {code:java}
> @Override
> public Stream<String> getViews(FacesContext facesContext, String path,
> int maxDepth, ViewVisitOption... options)
> {
> Stream<String> stream = super.getViews(facesContext, path, maxDepth,
> options);
> stream = stream.filter(f -> _strategy.handles(f));
> if (options != null &&
> Arrays.binarySearch(options,
> ViewVisitOption.RETURN_AS_MINIMAL_IMPLICIT_OUTCOME) >= 0)
> {
> stream = stream.map(f -> _strategy.getMinimalImplicitOutcome(f));
> }
> return stream;
> }
> {code}
> As you can see from the code above it would be possible to now return views
> here that are not actually handled specifically by the JSP vdl. For instance
> in the FaceletViewDeclarationLanguage we have the following filter in place:
> {code:java}
> stream = stream.filter(f -> (_strategy.handles(f) &&
>
> !FaceletsTemplateMappingUtils.matchTemplate(runtimeConfig, f) ) );
> {code}
> This filter allows us to specify something like the following in the
> faces-config.xml and avoid returning a view from getViews(), however now it
> would be returned incorrectly by the JSP vdl:
> {code:java}
> <faces-config-extension>
> <facelets-template-mapping>
> <url-pattern>/templates/*</url-pattern>
> </facelets-template-mapping>
> </faces-config-extension>
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)