Multiple Sticky

UI Components for JSF
Post Reply
Jgomes
Posts: 125
Joined: 13 Oct 2011, 11:30

16 Sep 2013, 16:15

I'm trying PF 4RC1 anf it's a great job.

but I'm usging two p:sticky or one p:stcky and one datatable with stickyHeader=true in the same page, but the second sticky remplace de previus sticky, Is it possible to use more that one?
Primefaces 5.2/5.3
Mojarra 2.1.29
Jboss AS7-WildFly 8

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

16 Sep 2013, 16:59

sticky is designed for one target at the moment and we haven't tested multiple stickies at same page. This might need some tweaking, can you provide a screenshot? How do they overlap and how it should look?

Jgomes
Posts: 125
Joined: 13 Oct 2011, 11:30

16 Sep 2013, 17:23

optimus.prime wrote:sticky is designed for one target at the moment and we haven't tested multiple stickies at same page. This might need some tweaking, can you provide a screenshot? How do they overlap and how it should look?
My English is very bad, I will prove to explin, in my code I have this

Code: Select all

<p:toolbar id="tb">  
				    <p:toolbarGroup align="left" >
				  		<p:tabMenu activeIndex="3">  
						   	<p:menuitem value="Home" url="/pages/credentialList.xhtml" icon="ui-icon-home"/>  
						   	<p:menuitem value="#{msg.Agreement}" url="/pages/supervisor/agreementManagmentSUP.xhtml" icon="ui-icon-gear" />
						    <p:menuitem value="#{msg.view_details}" url="/pages/supervisor/channelViewSUP.xhtml" icon="ui-icon-zoomin" />
						    <p:menuitem value="#{msg.Manage}" url="/pages/supervisor/channelListSUP.xhtml" icon="ui-icon-pencil" />  
						</p:tabMenu>   
				    </p:toolbarGroup>  
				  
				    <p:toolbarGroup align="right">
				    	<h:form>
					    	<p:commandLink action="#{mBUser.serviceLogoff}" id="logoff" ajax="false">  
					        	<p:graphicImage name="log_off.png" library="images" />
					        </p:commandLink>
					        <p:tooltip for="logoff" value="#{msg.Logoff}" showEffect="clip" hideEffect="explode" />
				        </h:form>
				    </p:toolbarGroup>  
				  
				</p:toolbar> 
				<p:sticky target="tb" /> 
and when in down the page this sticky appear, bottom this code I have a datatable

Code: Select all

<p:dataTable id="channelList" var="channel" value="#{mBChannel.channels}"  editable="true" emptyMessage="#{msg.ChannelNotFound}"
								 paginator="true" rows="10" paginatorAlwaysVisible="false" paginatorPosition="bottom" filteredValue="#{mBChannel.channelsFiltered}" stickyHeader="true">  
and when arrive to this table his header remplace the sticky of toolbar, but when I up the page again the toolbar sticky appear again but I think that will be interesting maintain the first sticky

Initial
Image
Overlay Sticky Toolbar
Image
headerSticky
Image
Primefaces 5.2/5.3
Mojarra 2.1.29
Jboss AS7-WildFly 8

LarsD
Posts: 69
Joined: 25 Nov 2011, 22:47
Location: Dresden, Germany

20 Feb 2018, 14:59

Hi,

I'm using PF 6.1 and I've got a smilar feature request.

When I use multiple stickies at the moment it is not working at all. Only the first element which is marked with a sticky element is shown correctly. All others are under or in it after scrolling down.
Also, the dataTable function stickyHeader="true" is not working when another sticky element is on the page.

Is something planned for PF 6.2 or 6.3 here?

kind regards
Lars

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

20 Feb 2018, 15:25

I don't think that it's planned until someone sponsors it via PrimeFaces PRO.
Alternative would be to create a feature request and provide a PR.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

LarsD
Posts: 69
Joined: 25 Nov 2011, 22:47
Location: Dresden, Germany

23 Feb 2018, 13:57

Ok. That's comprehensible.

Is there a feature in PF where I can detect when the sticky is scolled down like 100px an send an Ajax request or something like this?

I could be a workaround to add more content to the given sticky element when the content I need to see is gone due to scrolling down.

kind regards
Lars

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 47 guests