Is there a way to set the managed bean parameter in the composite component and then leave the usage classes to decide which actual managed bean to use?
something line by line: comp.xhtml
<cc:interface>
<cc:attribute name="price" />
<cc:param name="pageBean" value="#{superBean}" />
<cc:interface>
<cc:implementation>
<h:outputText value="#{cc.attrs.price}"/>
</cc:implementation>
And then, on the use page
<ezcomp:comp pageBean="actualBean"
price="#{actualBean.price}" >
</ezcomp:comp>
In my case, ActualBean is a subtype of SuperBean.
I'm not even sure that this is possible, but let me say that it would be great if someone proved that I was wrong.
Thank you in advance
source
share