p:scrollPanel inside p:tabView

Components, Ajax Framework, Utilities and More.
Post Reply
gianluca.elmo
Posts: 17
Joined: 10 Feb 2012, 19:57

02 Apr 2012, 12:27

Hallo,

is there a particular reason why I cannot get a scrollPanel work in the second, third, etc tab of a p:tabView, which is inside a p:dialog ?

<p:dialog modal="true" widgetVar="dlg">
<p:tabView ...>
<p:tab title="tab1">
<p:scrollPanel style="height: 530px; width: 860px;">
<ui:include src="./../pub/sections/file1.xhtml" />
</p:scrollPanel>
</p:tab>
<p:tab title="tab2">
<p:scrollPanel style="height: 530px; width: 860px;">
<ui:include src="./../pub/sections/file1.xhtml" />
</p:scrollPanel>
</p:tab>
<p:tab title="tab3">
<p:scrollPanel style="height: 530px; width: 860px;">
<ui:include src="./../pub/sections/file1.xhtml" />
</p:scrollPanel>
</p:tab>
</p:tabView>
</p:dialog>

I can get the vertical scroll bar only for the first tab.

The reason why I am trying that is because I want the tabs to remain visible while scrolling down.

Moreover, is there a way to reset the vertical scrollbar so that is starts always at the top?

Many thanks
Luca
Netbeans 8.2
Wildfly 10.1.0.Final
PF 6.0.16
Atlantis 1.0.1
Rewrite

gianluca.elmo
Posts: 17
Joined: 10 Feb 2012, 19:57

19 Apr 2012, 09:45

Hallo,

for the time being I have solved my problem by specifying the mode as native for all scroll panels.

<p:dialog modal="true" widgetVar="dlg">
<p:tabView ...>
<p:tab title="tab1">
<p:scrollPanel mode="native" style="height: 530px; width: 860px;">
<ui:include src="./../pub/sections/file1.xhtml" />
</p:scrollPanel>
</p:tab>
<p:tab title="tab2">
<p:scrollPanel mode="native" style="height: 530px; width: 860px;">
<ui:include src="./../pub/sections/file1.xhtml" />
</p:scrollPanel>
</p:tab>
<p:tab title="tab3">
<p:scrollPanel mode="native" style="height: 530px; width: 860px;">
<ui:include src="./../pub/sections/file1.xhtml" />
</p:scrollPanel>
</p:tab>
</p:tabView>
</p:dialog>

It allows me to show a scroll panel each tab and to reset the vertical scrollbar everytime the user selects one of the tabs.

I have seen that PrimeFaces scroll panel sets some css properties dynamically but I was not able to understand whether it is possible to use some js functions to override that behaviour.

Regards
Luca
Netbeans 8.2
Wildfly 10.1.0.Final
PF 6.0.16
Atlantis 1.0.1
Rewrite

Gatech
Posts: 12
Joined: 04 Jun 2011, 21:42

22 Jun 2012, 22:47

Native sucks :(

Isn't there still any other solution?

User avatar
optimus.prime
Prime
Posts: 17328
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

22 Jun 2012, 23:37

Non-native ScrollPanel is experimental right now, once it becomes stable we'll apply it to any container that overflows like scrollable table, scrolling selectOneMenu and so on.

ajeh
Posts: 14
Joined: 14 Sep 2013, 04:39

17 Sep 2013, 15:20

optimus.prime wrote:Non-native ScrollPanel is experimental right now, once it becomes stable we'll apply it to any container that overflows like scrollable table, scrolling selectOneMenu and so on.
Could you possibly mention that as a 'known issue' in your demo or manual to save the users from wasting hours trying to get it to work?
There are a couple of inches of space at the end of scrollPanel section in the manual on p.360 where this little notice would fit perfectly.
PrimeFaces 3.5

Post Reply
  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 20 guests