My problem is a little bit complex, but I'll give an example.
I already have a user.xhtml page (and a MB that uses it) where I register an user
<p:outputLabel value="Name:" /> <h:outputText value="#{userMB.bean.name}" />
<p:outputLabel value="e-mail:" /> <h:outputText value="#{userMB.bean.email}" />
etc...
Now I create an UserAdmMB
that inherits UserMB
, with another fields. I want to reuse the XHTML that exists, like using <ui:include>
:
<ui:include src="user.xhtml" />
<p:outputLabel value="Address:" />
<h:outputText value="#{userAdmMB.anotherbean.address}" />
But the first XHTML already has userMB
in it (to be used in another access point). How is the better way to do that?