The UIComponent
superclass has a getFacets()
method. Guess what it does :)
mainPanel.getFacets().put("header", htmlOutputLabel);
Unrelated to the concrete problem, the HtmlOutputLabel
represents the <h:outputLabel>
which is the wrong tool for the purpose. Use HtmlOutputText
instead which represents <h:outputText>
.