I have a parent faces view in one jspx page which includes a child subview from another jspx page. In my parent.jspx file I have a dataList which includes the child subview using a c:import tag, and in the child subview I would like to access a bean which exists in the parent page - and that has turned out to be difficult. Here is my parent page:

(this is the parent.jspx)
<x:dataList value="#{divisionLayoutBean.divisionConstraintBeans}" var="divisionConstraintBean" layout="simple"> <x:div rendered="#{divisionConstraintBean.rendered}"> <c:import url="#{divisionConstraintBean.rendererUri}"/>
                       </x:div>
                   </x:dataList>

It has been my assumption that I could then use the var "divisionConstraintBean" in my included pages like this:

(this is the child.jspx)
   <f:subview id="xyz">
       <h:graphicImage
           url="#{divisionConstraintBean.contractBean.uri}"
           alt="#{divisionConstraintBean.contractBean.description}"
       />
   </f:subview>

But I face all kinds of problems with this. Can anyone confirm that iteration variables are indeed available to subviews? Or are we JSF developers left with storing parameters in request scope and retrieving them manually in each included page?

Any hints will be highly appreciated.

Randahl

Reply via email to