Jsf - Panel

> Procedural Languages > Java > JavaServer Faces (JSF)

1 - About

A Panel Grid Jsf tag renders an html table with specified no. of columns. Children of this element are rendered in cells of the columns of the table.

3 - Example

3.1 - Jsf Page

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>my Title</title>
</head>
<body>
<f:view>
		<h:panelGrid width="100%" columns="3" border="1" style="width: 311px; ">
			<h:outputLabel for="FormField" value="Value"></h:outputLabel>
			<h:outputLabel for="FormField" value="Value"></h:outputLabel>
			<h:outputLabel for="FormField" value="Value"></h:outputLabel>
		</h:panelGrid>
	</f:view>
</body>
</html>

3.2 - Html Rendering

Renders an HTML “table” element, conforming to the rules in the HTML 401 specification.

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>my Title</title>
	</head>
	<body>
		<table border="1" style="width: 311px; " width="100%">
			<tbody>
				<tr>
					<td>
						<label>Value</label>
					</td>
					<td>
						<label>Value</label>
					</td>
 
					<td>
						<label>Value</label>
					</td>
				</tr>
			</tbody>
		</table>
 
	</body>
</html>
Advertising

4 - Documentation / Reference