In response to my own question, I would like to add that the problem
seems to be this line
<c:import
url="#{divisionConstraintBean.rendererUri}"/>
in which I try to dynamically set which page to import using the #{} syntax.
I guess the #{} syntax is not supported by JSTL core tags. My question
is then what is the JSF alternative to <c:import/> ?
Is it at all possible to import a page from a URL which is fetched from
a bean property?
Of course I guess I could just develop my own x:import tag which
supported #{} syntax - but is this really necessary?
Randahl
Randahl Fink Isaksen wrote:
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