[bug on 2.2M1] datatable column width & sort icon

UI Components for JSF
Post Reply
timotius_pamungkas
Posts: 117
Joined: 19 May 2010, 03:50

07 Sep 2010, 03:29

On 2.2 M1, when i have wide table (e.g. 15 columns), the "sort" icon is positioned over the header (overlay on same line)
for example

Code: Select all

<p:datatable dynamic="true" selectionMode="single" var="row" rows="15" value="#{testBean.list}" paginator="true" paginatorAlwaysVisible="true" widgetVar="myTable" id="myPrimeTable">
...lot of columns
<p:column sortBy="#{row.salary}">
   <f:facet name="header">
     The Salary
   </f:facet>
   #{row.salary}
</p:column>
...lot of columns
Since this is a wide table, it has more than 1500px width (my screen resolution = 1366 * 768px). - I still find a way to hide/show column based on user needs

When the header is larger than contents (e.g if #{row.salary} contains only 2 digit number), then the sort icon which on showcase appears on rightside of column header ("The Salary" above) now overlay with "The Salary".
So, i try to manually change the width of columns:

Code: Select all

<p:column sortBy="#{row.salary}" width="400">
</p:column>
but the width does not change

Guess you need to know so it can be fixed on 2.2 stable

Thanks
Tomcat 7.0.25
Mojarra 2.1.6
Primefaces 3.1, 3.2
Firefox 10 and IE 7/IE 8

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

07 Sep 2010, 10:34

To change column width you need;

Code: Select all

<p:column sortBy="#{row.salary}" style="width:400px">
</p:column>

timotius_pamungkas
Posts: 117
Joined: 19 May 2010, 03:50

08 Sep 2010, 06:16

sorry, forgot to tell you, it doesn't work on 2.2M1. On 2.1 it's fine
Tomcat 7.0.25
Mojarra 2.1.6
Primefaces 3.1, 3.2
Firefox 10 and IE 7/IE 8

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 41 guests