[ 
https://issues.apache.org/jira/browse/MYFACES-2925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12910769#action_12910769
 ] 

Leonardo Uribe commented on MYFACES-2925:
-----------------------------------------

Thinking more about it, in this case you can use ui:decorate instead ui:include:

[index.xhtml]

<ui:composition template="template.xhtml">
        <ui:define name="insertion">Inserted OK</ui:define>
</ui:composition>

[template.xhtml]

<h:body>
        <ui:decorate template="insertion.xhtml" />
</h:body>

[insertion.xhtml]

<ui:composition>
        <ui:insert name="insertion">Insertion Failed</ui:insert>
</ui:composition>

In this case, the same template context is used so, the code will work as 
expected. In other words, there exists a ways of do what you want using 
ui:decorate tag instead.

> Facelets: Fail to insert from page included in template
> -------------------------------------------------------
>
>                 Key: MYFACES-2925
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2925
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.0.2
>         Environment: MyFaces 2.0.2-SNAPSHOT
> Tomcat 6.0.29
> OpenJDK Runtime Environment (IcedTea6 1.8.1) (6b18-1.8.1-0ubuntu1)
>            Reporter: Lukas Fryc
>         Attachments: insertion-sample.war
>
>
> When trying to insert from page included in template, insertion fail.
> Works well in Mojarra 2.0.2.
> Attached sample war.
> [index.xhtml]
> <ui:composition template="template.xhtml">
>         <ui:define name="insertion">Inserted OK</ui:define>
> </ui:composition>
> [template.xhtml]
> <h:body>
>         <ui:include src="insertion.xhtml" />
> </h:body>
> [insertion.xhtml]
> <ui:composition>
>         <ui:insert name="insertion">Insertion Failed</ui:insert>
> </ui:composition>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to