markmalek / Fixed-Header-Table

jQuery plugin for tables with fixed headers
www.fixedheadertable.com
MIT License
930 stars 541 forks source link

Modifications to work with JSF / Icefaces #124

Open bxconrad opened 10 years ago

bxconrad commented 10 years ago

Thanks very much for this. I got it to work in icefaces 1.8.2 but had to make minor changes. I'm adding my comments in case anyone comes across similar issues. I am using ice:columns to build a table of dynamic columns. Not sure how this works with a regular table widget with fixed columns. The main problem was my headers were too small and not lining up with data columns. This fixed it (a hack, I admit it).

   // modification to work with icefaces. Column headers need extra padding.
    var extraPadding = 0.5;
    if (/msie/.test(navigator.userAgent.toLowerCase())) {
        extraPadding = 2;
    }

...
tableProp.thead[index] = $(this).width() + tableProp.border + extraPadding;