[jira] [Commented] (MYFACES-4180) ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY behavior different between MyFaces and Mojarra
[ https://issues.apache.org/jira/browse/MYFACES-4180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16313079#comment-16313079 ] Thomas Andraschko commented on MYFACES-4180: All right, thanks for the confirmationen. So the changes are fine. Will close it. > ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY behavior different between MyFaces > and Mojarra > --- > > Key: MYFACES-4180 > URL: https://issues.apache.org/jira/browse/MYFACES-4180 > 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-4180.patch > > > See the following dev discussion: > http://mail-archives.apache.org/mod_mbox/myfaces-dev/201711.mbox/%3cof507ae5dc.a54b3314-on002581db.006603e5-852581db.00680...@notes.na.collabserv.com%3e > We need to determine what updates we want to make here and how best to make > them. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-4180) ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY behavior different between MyFaces and Mojarra
[ https://issues.apache.org/jira/browse/MYFACES-4180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16313072#comment-16313072 ] Paul Nicolucci commented on MYFACES-4180: - If you think we need an additional change here let me know. Otherwise, I'll close this out over the weekend. > ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY behavior different between MyFaces > and Mojarra > --- > > Key: MYFACES-4180 > URL: https://issues.apache.org/jira/browse/MYFACES-4180 > 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-4180.patch > > > See the following dev discussion: > http://mail-archives.apache.org/mod_mbox/myfaces-dev/201711.mbox/%3cof507ae5dc.a54b3314-on002581db.006603e5-852581db.00680...@notes.na.collabserv.com%3e > We need to determine what updates we want to make here and how best to make > them. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-4180) ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY behavior different between MyFaces and Mojarra
[ https://issues.apache.org/jira/browse/MYFACES-4180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16313064#comment-16313064 ] Paul Nicolucci commented on MYFACES-4180: - There are three methods for getting views: 1) ResourceHandler.getViewResources(...) -> This uses the ResourceVisitOptions and we can determine to return meta-inf/web-inf depending on the value. 2) ViewHandler.getViews(...) -> This just calls through to ViewDeclarationLanguage.getViews(...): {code:java} Override public Stream getViews(FacesContext facesContext, String path, int maxDepth, ViewVisitOption... options) { Stream concatenatedStream = null; for (ViewDeclarationLanguage vdl : _vdlFactory.getAllViewDeclarationLanguages()) { Stream stream = vdl.getViews(facesContext, path, maxDepth, options); if (concatenatedStream == null) { concatenatedStream = stream; } else { concatenatedStream = Stream.concat(concatenatedStream, stream); } } return concatenatedStream == null ? Stream.empty() : concatenatedStream; {code} 3) ViewDeclarationLanguage.getViews(...) -> This calls through to the ResourceHandler.getViewResources(...) and passes TOP_LEVEL_VIEWS_ONLY which with our fix will prevent views within meta-inf/web-inf from being returned. {code:java} /** * * @since 2.3 * @param facesContext * @param path * @param maxDepth * @param options * @return */ public Stream getViews(FacesContext facesContext, String path, int maxDepth, ViewVisitOption... options) { // Here by default we follow what spec javadoc says // "...This method works as if invoking it were equivalent to evaluating the expression: // getViewResources(facesContext, start, Integer.MAX_VALUE, options) ..." // The problem here is ViewVisitOption != ResourceVisitOption. But whatever return // getViews must always have TOP_LEVEL_VIEWS_ONLY, because otherwise it will return // everything (css, js, ...). There is ViewVisitOption.RETURN_AS_MINIMAL_IMPLICIT_OUTCOME, // but this is a filter on top of the stream. return facesContext.getApplication().getResourceHandler().getViewResources( facesContext, path, maxDepth, ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY); {code} So in summary I think we are ok here. We can only get to web-inf/meta-inf if we call ResourceHandler.getViewResources and don't pass in the TOP_LEVEL_VIEWS_ONLY parameter. This as far as I can tell is the same behavior that is on Mojarra. > ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY behavior different between MyFaces > and Mojarra > --- > > Key: MYFACES-4180 > URL: https://issues.apache.org/jira/browse/MYFACES-4180 > 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-4180.patch > > > See the following dev discussion: > http://mail-archives.apache.org/mod_mbox/myfaces-dev/201711.mbox/%3cof507ae5dc.a54b3314-on002581db.006603e5-852581db.00680...@notes.na.collabserv.com%3e > We need to determine what updates we want to make here and how best to make > them. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-4180) ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY behavior different between MyFaces and Mojarra
[ https://issues.apache.org/jira/browse/MYFACES-4180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16312696#comment-16312696 ] Thomas Andraschko commented on MYFACES-4180: Probably we destroyed some mechanism here and ViewHandler#getViews could now return "view-resources" from meta-inf/web-inf. Could you check that [~paul.nicolucci]? > ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY behavior different between MyFaces > and Mojarra > --- > > Key: MYFACES-4180 > URL: https://issues.apache.org/jira/browse/MYFACES-4180 > 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-4180.patch > > > See the following dev discussion: > http://mail-archives.apache.org/mod_mbox/myfaces-dev/201711.mbox/%3cof507ae5dc.a54b3314-on002581db.006603e5-852581db.00680...@notes.na.collabserv.com%3e > We need to determine what updates we want to make here and how best to make > them. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-4180) ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY behavior different between MyFaces and Mojarra
[ https://issues.apache.org/jira/browse/MYFACES-4180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16312689#comment-16312689 ] Thomas Andraschko commented on MYFACES-4180: AFAICS the IF statements to skip meta-inf/web-inf were introduced by https://issues.apache.org/jira/browse/MYFACES-4103. Probably Leo tried to implemented an own mechanism to get top-level-views without using ResourceHandler#getView with TOP_LEVEL_VIEWS_ONLY. > ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY behavior different between MyFaces > and Mojarra > --- > > Key: MYFACES-4180 > URL: https://issues.apache.org/jira/browse/MYFACES-4180 > 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-4180.patch > > > See the following dev discussion: > http://mail-archives.apache.org/mod_mbox/myfaces-dev/201711.mbox/%3cof507ae5dc.a54b3314-on002581db.006603e5-852581db.00680...@notes.na.collabserv.com%3e > We need to determine what updates we want to make here and how best to make > them. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-4180) ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY behavior different between MyFaces and Mojarra
[ https://issues.apache.org/jira/browse/MYFACES-4180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16310957#comment-16310957 ] Thomas Andraschko commented on MYFACES-4180: +1. If it works fine, please commit it! > ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY behavior different between MyFaces > and Mojarra > --- > > Key: MYFACES-4180 > URL: https://issues.apache.org/jira/browse/MYFACES-4180 > Project: MyFaces Core > Issue Type: Bug > Components: JSR-372 >Affects Versions: 2.3.0-beta >Reporter: Paul Nicolucci > Fix For: 2.3.0 > > Attachments: MYFACES-4180.patch > > > See the following dev discussion: > http://mail-archives.apache.org/mod_mbox/myfaces-dev/201711.mbox/%3cof507ae5dc.a54b3314-on002581db.006603e5-852581db.00680...@notes.na.collabserv.com%3e > We need to determine what updates we want to make here and how best to make > them. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-4180) ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY behavior different between MyFaces and Mojarra
[ https://issues.apache.org/jira/browse/MYFACES-4180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16310158#comment-16310158 ] Paul Nicolucci commented on MYFACES-4180: - Patch uploaded with the changes that give us the behavior I described above. If you have any questions / suggestions let me know. Thanks! > ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY behavior different between MyFaces > and Mojarra > --- > > Key: MYFACES-4180 > URL: https://issues.apache.org/jira/browse/MYFACES-4180 > Project: MyFaces Core > Issue Type: Bug > Components: JSR-372 >Affects Versions: 2.3.0-beta >Reporter: Paul Nicolucci > Fix For: 2.3.0 > > Attachments: MYFACES-4180.patch > > > See the following dev discussion: > http://mail-archives.apache.org/mod_mbox/myfaces-dev/201711.mbox/%3cof507ae5dc.a54b3314-on002581db.006603e5-852581db.00680...@notes.na.collabserv.com%3e > We need to determine what updates we want to make here and how best to make > them. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-4180) ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY behavior different between MyFaces and Mojarra
[ https://issues.apache.org/jira/browse/MYFACES-4180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16310034#comment-16310034 ] Thomas Andraschko commented on MYFACES-4180: Yep. Great! > ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY behavior different between MyFaces > and Mojarra > --- > > Key: MYFACES-4180 > URL: https://issues.apache.org/jira/browse/MYFACES-4180 > Project: MyFaces Core > Issue Type: Bug > Components: JSR-372 >Affects Versions: 2.3.0-beta >Reporter: Paul Nicolucci > Fix For: 2.3.0 > > > See the following dev discussion: > http://mail-archives.apache.org/mod_mbox/myfaces-dev/201711.mbox/%3cof507ae5dc.a54b3314-on002581db.006603e5-852581db.00680...@notes.na.collabserv.com%3e > We need to determine what updates we want to make here and how best to make > them. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-4180) ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY behavior different between MyFaces and Mojarra
[ https://issues.apache.org/jira/browse/MYFACES-4180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16310019#comment-16310019 ] Paul Nicolucci commented on MYFACES-4180: - There are a few other changes to make as we want to do the following: 1) When TOP_LEVEL_VIEWS_ONLY is specified we don't want to return files in WEB-INF/META-INF 2) We also don't want to return views with invalid suffixes regardless of the options specified With the above we should have the same behavior as Mojarra. I have the changes locally and it looks to be working. I'll clean up the code and add a patch today/tomorrow for review. > ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY behavior different between MyFaces > and Mojarra > --- > > Key: MYFACES-4180 > URL: https://issues.apache.org/jira/browse/MYFACES-4180 > Project: MyFaces Core > Issue Type: Bug > Components: JSR-372 >Affects Versions: 2.3.0-beta >Reporter: Paul Nicolucci > Fix For: 2.3.0 > > > See the following dev discussion: > http://mail-archives.apache.org/mod_mbox/myfaces-dev/201711.mbox/%3cof507ae5dc.a54b3314-on002581db.006603e5-852581db.00680...@notes.na.collabserv.com%3e > We need to determine what updates we want to make here and how best to make > them. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-4180) ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY behavior different between MyFaces and Mojarra
[ https://issues.apache.org/jira/browse/MYFACES-4180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16309825#comment-16309825 ] Thomas Andraschko commented on MYFACES-4180: (and a unit test would be nice of course!) > ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY behavior different between MyFaces > and Mojarra > --- > > Key: MYFACES-4180 > URL: https://issues.apache.org/jira/browse/MYFACES-4180 > Project: MyFaces Core > Issue Type: Bug > Components: JSR-372 >Affects Versions: 2.3.0-beta >Reporter: Paul Nicolucci > Fix For: 2.3.0 > > > See the following dev discussion: > http://mail-archives.apache.org/mod_mbox/myfaces-dev/201711.mbox/%3cof507ae5dc.a54b3314-on002581db.006603e5-852581db.00680...@notes.na.collabserv.com%3e > We need to determine what updates we want to make here and how best to make > them. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-4180) ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY behavior different between MyFaces and Mojarra
[ https://issues.apache.org/jira/browse/MYFACES-4180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16309813#comment-16309813 ] Thomas Andraschko commented on MYFACES-4180: I think the fix is quite easy - and as already posted on the mailing, it will be more detailed specified in JSF.next. [~paul.nicolucci] Could you please remove the both IF statements (WEB-INF and META-INF) in ExternalContextResourceLoaderIterator and try out case again? > ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY behavior different between MyFaces > and Mojarra > --- > > Key: MYFACES-4180 > URL: https://issues.apache.org/jira/browse/MYFACES-4180 > Project: MyFaces Core > Issue Type: Bug > Components: JSR-372 >Affects Versions: 2.3.0-beta >Reporter: Paul Nicolucci > > See the following dev discussion: > http://mail-archives.apache.org/mod_mbox/myfaces-dev/201711.mbox/%3cof507ae5dc.a54b3314-on002581db.006603e5-852581db.00680...@notes.na.collabserv.com%3e > We need to determine what updates we want to make here and how best to make > them. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (MYFACES-4180) ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY behavior different between MyFaces and Mojarra
[ https://issues.apache.org/jira/browse/MYFACES-4180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16291047#comment-16291047 ] Thomas Andraschko commented on MYFACES-4180: It seems like https://issues.apache.org/jira/browse/MYFACES-4175 https://issues.apache.org/jira/browse/MYFACES-4180 https://issues.apache.org/jira/browse/MYFACES-4105 are all related. [~lu4242] Could you check this? It's probably only a little bit effort for you to get this running correctly. > ResourceVisitOption.TOP_LEVEL_VIEWS_ONLY behavior different between MyFaces > and Mojarra > --- > > Key: MYFACES-4180 > URL: https://issues.apache.org/jira/browse/MYFACES-4180 > Project: MyFaces Core > Issue Type: Bug > Components: JSR-372 >Affects Versions: 2.3.0-beta >Reporter: Paul Nicolucci > > See the following dev discussion: > http://mail-archives.apache.org/mod_mbox/myfaces-dev/201711.mbox/%3cof507ae5dc.a54b3314-on002581db.006603e5-852581db.00680...@notes.na.collabserv.com%3e > We need to determine what updates we want to make here and how best to make > them. -- This message was sent by Atlassian JIRA (v6.4.14#64029)