Possible Duplicate:
How to pass parameters to ui:include that inside of c:forEach tag
This one ( How do I set Managed Bean field to the value of a ui:param? ) is working well. If I'm looping the ui:include with the help of a JST c:forEach the Facelet Attributes (ui:param) always resolves to null.
<c:forEach items="#{myList} var="myItem">
<ui:include src="#{myItem.myPage}">
<ui:param name="myVar" value="#{myItem.myData}"/>
</ui:include>
</c:forEach>
And I'm trying to resolve the Facelet Attribute within a JSF Managed Bean (which is exclusively for exact one ui:include per JSF view)
FacesContext facesCtx = FacesContext.getCurrentInstance();
FaceletContext faceletCtx = (FaceletContext) facesCtx.getAttributes().get(FaceletContext.FACELET_CONTEXT_KEY);
Object myVar = faceletCtx.getAttribute("myVar");
As long as I'm not looping the (no c:forEach) this approach works well. But after introducing the c:forEach myVar is always null.
What is JSTL c:forEach changing at the facelet attributes (names)? How can I still access them in my Backing Bean?
Unfortunately FaceletContext does not expose any methods to list all facelet attributes, so I might "find" them on my own ... :S