Under JSF 1.2 and Facelets, you could specify a ui:param value as a child
of ui:decorate, and it would be used in any included files.
Under JSF 2.1, the ui:param value evaluates to null in the included files
unless it is passed as a child of the ui:include.
Is this a bug or a spec-required change in behavior?
=========== template.xhtml =================
<html>
...
<ui:insert name="body" />
...
</html>
=========== template.xhtml =================
=========== somepage.xhtml =================
<ui:decorate template="/pages/include/template.xhtml"
...>
<ui:define name="body">
<ui:param name="sourcePage" value="#{sourcePageBeanExpression}" />
// This included page would have a null sourcePage (worked under
JSF1.2/Facelets)
<ui:include src="includedFragment.xhtml">
</ui:include>
// This included page would have a valid sourcePage
<ui:include src="includedFragment.xhtml">
<ui:param name="sourcePage"
value="#{sourcePageBeanExpression}" />
</ui:include>
</ui:define>
<ui:decorate>
=========== somepage.xhtml =================
=========== includedFragment.xhtml =================
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
...>
<ui:param name="myBean"
value="#{sourcePage.specificIncludedBeanBehavior}"/>
<h:outputText value="#{myBean.valueString}" />
<h:panelGrid binding="#{myBean.messagePanel}" />
etc
</ui:composition>
=========== includedFragment.xhtml =================