p:table with rotated headers
TypePDFDOCTXTJPGPNGHEICSVGZIPEML
Primary848878204
Replica434704408
Cache515754101

Rotate

In some cases, often when the cell content is only a single number, but the label of the table header have many character, it's easy to optimise the layout and safe space in rotating the table headers. This is achieved with the styleClass="jeeslDtThVertical" .

<p:dataTable var="r" value="#{styleTableRotateBean.rows}" styleClass="jeesl-datatable">
	<f:facet name="header">
		<j:dtHeader title="p:table with rotated headers"/>
	</f:facet>
	<p:columnGroup type="header">
		<p:row>
			<p:column colspan="1" headerText="Type" />
			<p:columns var="c" value="#{styleTableRotateBean.columnsA}">
				<f:facet name="header">
					<h:outputText value="#{c.name[localeCode].lang}"/>
				</f:facet>
			</p:columns>
			<p:columns var="c" value="#{styleTableRotateBean.columnsB}"
					styleClass="jeesl-datatable-header-vertical" >
				<f:facet name="header">
					<h:outputText value="#{c.name[localeCode].lang}"/>
				</f:facet>
			</p:columns>
		</p:row>
	</p:columnGroup>
	<p:column rendered="true">  
		<h:outputText value="#{r.name[localeCode].lang}"/>
	</p:column>
	<p:columns var="c" value="#{styleTableRotateBean.columnsA}"
			styleClass="jeeslCenter">
		<h:outputText value="#{styleTableRotateBean.map[r][c]}"/>
	</p:columns>
	<p:columns var="c" value="#{styleTableRotateBean.columnsB}"
			styleClass="jeeslCenter">
		<h:outputText value="#{styleTableRotateBean.map[r][c]}"/>
	</p:columns>
</p:dataTable>