Primefaces p:dataTable with dynamic columns

<p:dataTable rendered="true" sortBy="#{record.column1}" value="#{tableGenerator.dataTable.records}" var="record"
		id="tblResult" paginator="true" rows="10" style="font-size:9px;"
		<f:facet name="header">
			<h:outputText style="text-align:left!important;color:green;"
				value="Total Record size (#{tableGenerator.dataTable.recordsSize} records)" />
		<c:forEach var="column" items="#{tableGenerator.dataTable.columnArr}">
			<p:column sortBy="#{record[column]}" filterBy="#{record[column]}">
				<f:facet name="header">
					<h:outputText value="#{column}" />
				<h:outputText value="#{record[column]}" />

Leave a Reply

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

You are commenting using your 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