JSF Showcase

h:panelGrid

HtmlPanelGrid is a UIPanel component that renders a <table> element to layout its children in a tabular grid.

General Usage

The columns attribute specifies how many table columns are rendered. A new table row will be rendered if the number of children exceeds the number of columns.
Row 1 Col 1 Row 1 Col 2 Row 1 Col 3
Row 2 Col 1 Row 2 Col 2 Row 2 Col 3
Row 3 Col 1

Source Code

<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html"
	xmlns:ui="http://xmlns.jcp.org/jsf/facelets">

	<h:form>
		<h:panelGrid border="1" columns="3" >
			<h:outputText value="Row 1 Col 1" />
			<h:outputText value="Row 1 Col 2" />
			<h:outputText value="Row 1 Col 3" />
			<h:outputText value="Row 2 Col 1" />
			<h:outputText value="Row 2 Col 2" />
			<h:outputText value="Row 2 Col 3" />
			<h:outputText value="Row 3 Col 1" />
		</h:panelGrid>
	</h:form>

</ui:composition>
Liferay Faces Bridge Implementation 4.1.0 + Showcase Common 3.0.1 + Liferay Faces Util 3.1.0 + Mojarra 2.2.14