What is the equivalent of f:facet in Java?
I've created a panel in Java using org.primefaces.component.panel.Panel class like below.
Panel p = new Panel();
p.setId("panelId");
p.setClosable(true);
p.setVisible(true);
Now I have to add a header to this panel which contains a commandButton. In xhtml, we can achieve this simply by using f:facet but in Java I'm unable to find a way to do this.
So basically I'm looking for a Java equivalent of this code:
<p:panel id="panelId" header="Graph">
<f:facet name="header" >
<p:commandButton id="createWO" value="Create Work Order" icon="pi pi-pencil" >
</p:commandButton>
</f:facet>
</p:panel>
Any help would be greatly appreciated. Thank you.