Data Table Header (Scrolling and Sorting)

Components, Ajax Framework, Utilities and More.
Post Reply
MikeK
Posts: 101
Joined: 13 Oct 2010, 15:07

13 Oct 2010, 16:46

When I create a data table that is scrollable and sortable I am having a problem with the headers. If I sort on one of the columns the column widths change but the headers do not. This makes them no longer line up.

SAMPLE CODE

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.prime.com.tr/ui">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</h:head>
<h:body>
<p:panel >
<h:form id="form1">
<p:dataTable var="prop" value="#{propList.propList}" scrollable="true" height="150">
<p:column sortBy="#{prop.propPropertyId}" >
<f:facet name="header">
<h:outputText value="Property ID" />
</f:facet>
<h:outputText value="#{prop.propPropertyId}" />
</p:column>
<p:column sortBy="#{prop.propName}">
<f:facet name="header">
<h:outputText value="Prop Name" />
</f:facet>
<h:outputText value="#{prop.propName}" />
</p:column>
</p:dataTable>
</h:form>
</p:panel>
</h:body>
</html>
Prime Faces 5.2.6
Mojarra 2.2.4
Apache Tomcat 8.0.24
Internet Explorer 10,11

MikeK
Posts: 101
Joined: 13 Oct 2010, 15:07

18 Oct 2010, 12:43

Can anyone tell me if they are having the same issue? There is no example in the showcase of a data table that is both sortable and scrollable so I can not tell if I am doing something wrong or if it is a bug in the component.

Thank You,

Mike
Prime Faces 5.2.6
Mojarra 2.2.4
Apache Tomcat 8.0.24
Internet Explorer 10,11

User avatar
optimus.prime
Prime
Posts: 17328
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

18 Oct 2010, 13:16

Sounds like a visual bug, you may create an issue ticket so we can look in detail.

MikeK
Posts: 101
Joined: 13 Oct 2010, 15:07

18 Oct 2010, 15:28

Thank you for the response. I have submitted the issue.
Prime Faces 5.2.6
Mojarra 2.2.4
Apache Tomcat 8.0.24
Internet Explorer 10,11

User avatar
bumble.bee
Posts: 723
Joined: 29 Sep 2010, 21:39
Location: United States

21 Oct 2010, 14:45

There is a related issue where if you resize the browser the header no longer lines up with the columns. The issue is here:

http://code.google.com/p/primefaces/iss ... il?id=1253


Also, there isn't a link to the issue discussed above so I am inserting a link to what I believe to be the one that was created:

http://code.google.com/p/primefaces/iss ... il?id=1333

Post Reply
  • Information
  • Who is online

    Users browsing this forum: Bing [Bot] and 29 guests