I developing a simple application using JSF and PrimeFaces and here's a problem that I'm facing:
These are managed beans that have a Person
property:
ClientBean
EmployeeBean
I have the person.xhtml
that shows the data from a person. I include the person.xhtml
on a client.xhtml
and employee.xhtml
. I need to create two person.xhtml
because I'm using different beans. What I want to do is something like that:
<c:set var="person" value="clientBean.person" />
<ui:include src="person.xhtml"/>
<c:set var="person" value="employeeBean.person" />
<ui:include src="person.xhtml"/>
And in my person.xhtml
I can use #{person.name}
, #{person.dateOfBirth}
.
I searched and use <c:set/>
in JSF is wrong.
Anyone can help?