Hello I'm using Primefaces (5.2 currently). I'm novice in JSF so what I'm thinking about shouldn't be possible. Please correct me if I'm wrong :)
I'm creating simple application with registration. Administrator can edit registered users, etc.
So I just want to simplify development with templates.
For example I've created template:
<ui:composition>
<p:panel id="#{userPanelId}">
<div>
<p:outputLabel value="#{label['userBean.user.firstName']}" for="firstName"/>
<p:inputText value="#{userView.user.firstName}" id="firstName"
label="#{label['userBean.user.firstName']}"/>
<p:message for="firstName"/>
</div>
<div>
<p:outputLabel value="#{label['userBean.user.lastName']}" for="lastName"/>
<p:inputText value="#{userView.user.lastName}" id="lastName"
label="#{label['userBean.user.lastName']}"/>
<p:message for="lastName"/>
</div>
<div>
<p:outputLabel value="#{label['userBean.user.email']}" for="userEmail"/>
<p:inputText value="#{userView.user.email}" id="userEmail"
label="#{label['userBean.user.email']}"/>
<p:message for="userEmail"/>
</div>
<ui:insert name="userPanelExtension"/>
</p:panel>
</ui:composition>
My userView is @RequestScoped (or in spring by @Scope(request)). I realised that it would be useful to have this bean for both scopes @RequestScoped and @SessionScoped.
is is it possible to have one abstract userView an then extend it and create userViewRequestScoped userViewSessionScoped for example?
is it then possible to parametrise name of view bean in template file? For example in
<p:inputText value="#{userView.user.firstName}" id="firstName" />
have something like
<p:inputText value="#{${parametrisedBeanName}.user.firstName}" id="firstName" />
Thanks in advance