I need to migrate a composite component to a custom component. This example is quite simplistic, but it demonstrates the problem: the children of my component ( my:test ) should be displayed in another component. Composite my:testC , as an example that I do not want to use, will look like this:
<composite:implementation> <p:panel> <composite:insertChildren/> </p:panel> </composite:implementation>
Obviously (at least I hope I'm right with this assumption). I cannot just display p:panel in encodeBegin .
@FacesComponent("test") public class Test extends UIPanel { @Override public void encodeBegin(FacesContext context) throws IOException {
I want to use my:test as follows:
<my:test> <h:outputText value="some Text"/> </my:test>
The output should be the same as when using my:testC : some text displayed in the PrimeFaces panel. How can I code using p:panel in my Java class?
source share