Reputation: 129
In the header column of <rich:extendedDataTable>
I need to add two output texts in a single line as header label with different style class. How can I do this? I tried this different ways, but I can't achieve my goal.
<rich:extendedDataTable ...>
<rich:column label="Name">
<f:facet name="header">
<h:outputText value="Short Description" />
</f:facet>
<h:inputText ... />
</rich:column>
</rich:extendedDataTable>
I want display another label with a different color in the same line. I.e. "Short Description" is default style and next label in same line should be in different color.
For example, header column "Name" in black color and near this I want display *
in red color like
-------------------------
Name * | Age
-------------------------
Here *
should display in red color.
Upvotes: 1
Views: 6755
Reputation: 1108742
This is pretty straightforward. I think that your problem is caused by the fact that a <f:facet>
cannot have more than one child. So the following wouldn't work:
<f:facet name="header">
<h:outputText value="Short Description" />
<h:outputText value="*" style="color:red;" />
</f:facet>
but the following should work:
<f:facet name="header">
<h:panelGroup>
<h:outputText value="Short Description" />
<h:outputText value="*" style="color:red;" />
</h:panelGroup>
</f:facet>
Upvotes: 3