Page 1 of 1

StickyHeader in p:dataTable problem2

Posted: 02 Feb 2017, 13:33
by PiotrekG
Hi everyone. I work with form who contains p:dataTable and stickyHeader="true". Above data table I have p:panel with option toggleable="true".
When I hide panel rest of form moves up , dataTable is moves up but stickHeader doesn't. Please healp. Best regards.

Re: StickyHeader in p:dataTable problem2

Posted: 07 Feb 2017, 15:08
by mert.sincan
I think it is not a Ultima Theme and Layout issue. But, you can try the following js code;

Code: Select all

//JS
function updateSticky() {
    var $this = PF('myStickyTable');
    if($this) {
        $this.stickyContainer.css('display', 'none');
        setTimeout(function() {
            $(window).trigger('scroll.' + $this.id);
        },400);
    }
}

//XHTML
<p:panel toggleable="true" collapsed="true" ..>
      <p:ajax event="toggle" oncomplete="updateSticky()" />
      ...
</p:panel>
                    
<p:dataTable widgetVar="myStickyTable"

Re: StickyHeader in p:dataTable problem2

Posted: 16 Feb 2017, 10:23
by PiotrekG
Thank You very much. It resolved the problem. :D

Re: StickyHeader in p:dataTable problem2

Posted: 16 Feb 2017, 14:05
by mert.sincan
Glad to hear, thanks for the update!

Re: StickyHeader in p:dataTable problem2

Posted: 04 Dec 2018, 22:59
by karcio
Thanks, your solution helped me too.
But shouldn't this be solved in Ultima sources ? , because it looks like a bug.

Re: StickyHeader in p:dataTable problem2

Posted: 05 Dec 2018, 14:39
by mert.sincan
But shouldn't this be solved in Ultima sources ? , because it looks like a bug.
- No. This issue is not a Ultima Layout or Theme issue. You can try it without Ultima Layout and Theme. Please create a Github issue.

Best Regards,

Re: StickyHeader in p:dataTable problem2

Posted: 05 Dec 2018, 22:21
by karcio
I made a little mess, i wanted to ask my question i similar topic 'StickyHeader in p:dataTable problem' (viewtopic.php?f=42&t=49290&hilit=Sticky ... le+problem), but by mistake i asked in this topic.
I saw aragorn that in this other topic you also asked and helped (for my your solution also work), could tell me if there is also problem with PrimeFaces not in Ultima Layout ?

Re: StickyHeader in p:dataTable problem2

Posted: 06 Dec 2018, 08:58
by mert.sincan
Yes, this issue is related to PrimeFaces core. Maybe, you can create a Github issue for it.

Best Regards,