[ https://issues.apache.org/jira/browse/MYFACES-4304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16979267#comment-16979267 ]
Steven De Groote commented on MYFACES-4304: ------------------------------------------- I see we are missing a stacktrace on the original problem, but I'm currently seeing some issues with some include, and was wondering if the below problem could have the same cause? (Sadly, WAS Libery 19 seems to use MyFaces 2.3.4) {code:java} java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at java.util.ArrayList.rangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at org.apache.myfaces.view.facelets.impl.DefaultFaceletContext.popTemplateContext(DefaultFaceletContext.java:631) at org.apache.myfaces.view.facelets.tag.ui.IncludeHandler.apply(IncludeHandler.java:253) at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:46) at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:56) at org.apache.myfaces.view.facelets.tag.jsf.ComponentTagHandlerDelegate.apply(ComponentTagHandlerDelegate.java:373) at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:51) at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:46) {code} > dynamic ui:include doesn't always work > -------------------------------------- > > Key: MYFACES-4304 > URL: https://issues.apache.org/jira/browse/MYFACES-4304 > Project: MyFaces Core > Issue Type: Bug > Components: General > Affects Versions: 2.2.12, 3.0.0-SNAPSHOT, 2.3.5 > Reporter: Thomas Andraschko > Assignee: Thomas Andraschko > Priority: Major > Fix For: 2.2.13, 3.0.0-SNAPSHOT, 2.3.6 > > Attachments: primefaces-test.7z > > > Just run the attached sample > - initially there is "" assigned to the ui:include > - if you open the sidebar via "include 1", a new src is set and the UI > updated but the include is not in the view > it seems to happen because of this If: > if (!PhaseId.RESTORE_VIEW.equals(ctx.getFacesContext().getCurrentPhaseId())) > in the IncludeHandler. > Seems that our IncludeHandler is executed to early in RESTORE_VIEW, as the > new include is set in the INVOKE_APPLICATION phase. > In both Mojarra and MyFaces VDL#buildView is called 2 times on the POST: > 1) in RestoreView > 2) in RenderResponse > The difference is, that only Mojarra calls the IncludeHandler in both phases. > MyFaces calls it only in RestoreView. -- This message was sent by Atlassian Jira (v8.3.4#803005)