2.2.M1 wide dataTable rendering bug

UI Components for JSF
Post Reply
bluewing
Posts: 25
Joined: 14 Aug 2010, 19:02

14 Sep 2010, 12:21

Hi,

In 2.2.M1 dataTables wider than the browser window are not rendered correctly, the header and the footer does not extend to match the width of the table. Screenshot: http://imagebin.org/114022

A possible but ugly workaround is to set the width of the header and footer using jQuery, and add div.ui-datatable{overflow: auto} to your CSS declarations.

Code: Select all

<script type="text/javascript">
//<![CDATA[
jQuery(window).load( function() {
	var datatableWidth = jQuery('div.ui-datatable > table').width();

	jQuery('div.ui-datatable > div.ui-datatable-header').width(datatableWidth - 22);
	jQuery('div.ui-datatable > div.ui-paginator').width(datatableWidth - 6);
});
//]]>
</script>
This will fix only the first dataTable on the page, if you have more try using the jQuery .each() function or id selectors.

In the next version of PrimeFaces it would be better to put the header in thead and the footer in tfoot instead of using separate divs.
GlassFish 3.1, Mojarra 2.1.0-FCS, Facelets, PrimeFaces 2.2.1

OneCent
Posts: 38
Joined: 10 Sep 2010, 16:25
Contact:

14 Sep 2010, 15:28

yep, i did see the same thing in my own tests.
Mojarra 2.0.4 / Glassfish v3.1 / Primefaces 2.2.1 / Netbeans 7 / OS X

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

18 Sep 2010, 14:49

Please create an issue ticket so we can have a look in detail.

bluewing
Posts: 25
Joined: 14 Aug 2010, 19:02

19 Sep 2010, 14:00

I have created issue 1240. Thanks for looking into this problem.
GlassFish 3.1, Mojarra 2.1.0-FCS, Facelets, PrimeFaces 2.2.1

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 50 guests