StickyHeader in p:dataTable problem2

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
PiotrekG
Posts: 9
Joined: 05 Oct 2016, 07:38

02 Feb 2017, 13:33

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.
Running on PrimeFaces 6.1
GlassFish Server Open Source Edition 4.1.2
JSF 2.2

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

07 Feb 2017, 15:08

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"

PiotrekG
Posts: 9
Joined: 05 Oct 2016, 07:38

16 Feb 2017, 10:23

Thank You very much. It resolved the problem. :D
Running on PrimeFaces 6.1
GlassFish Server Open Source Edition 4.1.2
JSF 2.2

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

16 Feb 2017, 14:05

Glad to hear, thanks for the update!

karcio
Posts: 3
Joined: 27 Dec 2016, 17:59

04 Dec 2018, 22:59

Thanks, your solution helped me too.
But shouldn't this be solved in Ultima sources ? , because it looks like a bug.

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

05 Dec 2018, 14:39

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,

karcio
Posts: 3
Joined: 27 Dec 2016, 17:59

05 Dec 2018, 22:21

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 ?

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

06 Dec 2018, 08:58

Yes, this issue is related to PrimeFaces core. Maybe, you can create a Github issue for it.

Best Regards,

Post Reply

Return to “Ultima - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests