Page 1 of 1

Data Table Header (Scrolling and Sorting)

Posted: 13 Oct 2010, 16:46
by MikeK
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>

Re: Data Table Header (Scrolling and Sorting)

Posted: 18 Oct 2010, 12:43
by MikeK
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

Re: Data Table Header (Scrolling and Sorting)

Posted: 18 Oct 2010, 13:16
by cagatay.civici
Sounds like a visual bug, you may create an issue ticket so we can look in detail.

Re: Data Table Header (Scrolling and Sorting)

Posted: 18 Oct 2010, 15:28
by MikeK
Thank you for the response. I have submitted the issue.

Re: Data Table Header (Scrolling and Sorting)

Posted: 21 Oct 2010, 14:45
by bumble.bee
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