sorting in p:dataTable
-
- Posts: 280
- Joined: 25 Jun 2010, 01:18
I look at the showcase of how to do sorting in dataTable, http://www.primefaces.org/showcase/ui/d ... Client.jsf, I did not see any attribute is set that make it do sorting. I look at the bean, nothing interesting beside sometimes "cars" is refer as "carsSmall". How do we do sorting in dataTable again?
Mojarra 2.1.10, Glassfish 3.1, Tomcat 7, Primeface 3.3.1
IE 6-8, FireFox 10-13
MAC OSX Lion, Windows XP, 7
Hi,
Hmm, the source code in the showcase doesn't appear to be telling the full story! For example, the first column of the first dataTable should look like this:
The important bit is the sortBy attribute. There's more info on page 112 of the current user's guide.
Hmm, the source code in the showcase doesn't appear to be telling the full story! For example, the first column of the first dataTable should look like this:
Code: Select all
<p:column sortBy="#{car.model}">
<f:facet name="header">
<h:outputText value="Model" />
</f:facet>
<h:outputText value="#{car.model}" />
</p:column>
-
- Posts: 280
- Joined: 25 Jun 2010, 01:18
super. Thank you
Mojarra 2.1.10, Glassfish 3.1, Tomcat 7, Primeface 3.3.1
IE 6-8, FireFox 10-13
MAC OSX Lion, Windows XP, 7
-
- Information
-
Who is online
Users browsing this forum: No registered users and 78 guests