You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-user@incubator.apache.org by ro...@s-rod.com on 2007/04/17 19:07:07 UTC

fixed header, scrolling body in ... hidden feature?

Hi,

I'm badly in need of a datatable with fixed headers and a scrolling body, of the type that a few other (some commercial) JSF component sets have.  I was digging into the source of the table renderer, and saw a lot of code related to scrolling.  It seems that if "height" is available from the CoreTable component, the renderer will try to render the body as scrolling.

The <tr:table> tag doesn't expose "height", so you can't do this out of the box, but as a test, I quickly created a custom renderer based off the default--which basically does everything the same except that it forces "height" to have a value.  Sure enough, when I wire this renderer to a custom component and display, I get the regular <tr:table> with fixed headers and a vertical scrollbar for the body.

In IE. :-(        

There is a bunch of branching in the code to deal specifically with IE (the fixed row is rendered with absolute positioning to get around the browser bug), but unfortunately nothing in the code that makes other browsers display a scrolling body.  That should be the easy part- setting the proper CSS on <tbody> ought to do it in Firefox and others.

So my question is, what is the state of this feature?  Hidden, half-implemented, or something else?  Any plans to revive it?  (note:  I am working off a fairly old build of the 1.2 branch, but I don't recall seeing any updates about this)  For my purposes, I was going to either (a) let the IE hack run in all situations- not ideal but might work okay, or (b) continue extending the table renderer to properly write CSS for non-IE browsers in scrolling situations.  Any insights would be appreciated.

Thanks in advance,
Rogers

Re: fixed header, scrolling body in ... hidden feature?

Posted by Adam Winer <aw...@gmail.com>.
It's a half-implemented feature.  I'd be happy seeing it
revived for real (albeit, perhaps with a better API
than setting "height'!), as long as it worked in both
IE and FF.  I wonder if we might even be able to
use the same CSS approach in FF and IE 7.

-- Adam


On 4/17/07, rogers_reilly@s-rod.com <ro...@s-rod.com> wrote:
> Hi,
>
> I'm badly in need of a datatable with fixed headers and a scrolling body, of the type that a few other (some commercial) JSF component sets have.  I was digging into the source of the table renderer, and saw a lot of code related to scrolling.  It seems that if "height" is available from the CoreTable component, the renderer will try to render the body as scrolling.
>
> The <tr:table> tag doesn't expose "height", so you can't do this out of the box, but as a test, I quickly created a custom renderer based off the default--which basically does everything the same except that it forces "height" to have a value.  Sure enough, when I wire this renderer to a custom component and display, I get the regular <tr:table> with fixed headers and a vertical scrollbar for the body.
>
> In IE. :-(
>
> There is a bunch of branching in the code to deal specifically with IE (the fixed row is rendered with absolute positioning to get around the browser bug), but unfortunately nothing in the code that makes other browsers display a scrolling body.  That should be the easy part- setting the proper CSS on <tbody> ought to do it in Firefox and others.
>
> So my question is, what is the state of this feature?  Hidden, half-implemented, or something else?  Any plans to revive it?  (note:  I am working off a fairly old build of the 1.2 branch, but I don't recall seeing any updates about this)  For my purposes, I was going to either (a) let the IE hack run in all situations- not ideal but might work okay, or (b) continue extending the table renderer to properly write CSS for non-IE browsers in scrolling situations.  Any insights would be appreciated.
>
> Thanks in advance,
> Rogers
>