Primefaces p:dataTable example


<p:dataTable rendered="true" value="#{bean.records}" var="record"
		id="tblResult" paginator="true" rows="15" style="font-size:9px;">
		<f:facet name="header">
			<h:outputText style="text-align:left!important;color:green;"
				value="Total Record size (#{bean.size} records)" />
		</f:facet>
	    <p:column>
				<f:facet name="header">
					<h:outputText value="COLUMN1" style="font-weight:bold;color:green;"/>
				</f:facet>
				<h:outputText value="#{record.value1}" />
	    </p:column>
	    <p:column>
				<f:facet name="header">
					<h:outputText value="COLUMN2" style="font-weight:bold;color:green;" />
				</f:facet>
				<h:outputText value="#{record.value2}" />
	    </p:column>       
	</p:dataTable>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s