Manuel K created MYFACES-4577:
---------------------------------
Summary: ui:insert nested in ui:include not added to component tree
Key: MYFACES-4577
URL: https://issues.apache.org/jira/browse/MYFACES-4577
Project: MyFaces Core
Issue Type: Bug
Components: General
Affects Versions: 4.0.0-RC5
Environment: primefaces-test project, jakarta branch
Reporter: Manuel K
When having a structure where a ui:insert is used in a file included by
ui:include, the components that should be added by the ui:insert are not added
to the component tree or at least not before other components are processed.
So the structure is as follows:
ui:composition (test.xhtml) uses template (template.xhtml) and defines a header
that is included from another file using ui:include (test_header.xhtml)
template (template.xhtml) includes a ui:composition (header.xhtml) that inserts
the header into the template
The composite component specified in test_header.xhtml is not added to the
component tree before the update attribute of a commandButton is processed and
throws a ComponentNotFoundException.
You probably didn't understand a single thing, so the easiest is to take a look
at the primefaces-test project I created here:
https://github.com/mkomko/primefaces-test/tree/component-not-found
I can't say for sure if this structure is supported by the spec, but it works
in Mojarra.
It works using
{code:java}
mvn clean jetty:run -Pmojarra40{code}
but not using
{code:java}
mvn clean jetty:run -Pmyfaces40{code}
Thank you very much in advance for taking a look! We're evaluating migrating
our large web application from Mojarra to MyFaces, so you might hear from me
again ;).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)