I pass the parameter p1to another page page.xhtml:
<ui:include src="page.xhtml">
<ui:param name="p1" value="#{someObject}"/>
</ui:include>
Is it possible to evaluate #{p1}the bean support inside the @PostConstruct method page.xhtml? Using the following code snippet #{p1}cannot solve:
FacesContext currentInstance = FacesContext.getCurrentInstance();
currentInstance.getApplication().evaluateExpressionGet(currentInstance, "#{p1}", String.class);
Why do I need it?
I am using an xhtml file (e.g. component.xhtml) as the user interface component of the user interface. This file has a bean backup from which I should get the component data. Since I include this xhtml file twice or more on my JSF main page, I want to pass different objects to each component.xhtml component so that each of my components works with my custom data.
source
share