Theme
arya
luna-amber
luna-blue
luna-green
luna-pink
nova-dark
nova-light
saga
vela
Waypoint
Waypoint Waypoint makes it easy to execute a custom logic whenever you scroll to an element. Waypoints make a solid base for modern UI patterns that depend on a user's scroll position on a page. Supported is vertical as well as horizontal scrolling. Application areas are countless, explore our use cases self!

Waypoint component can be used either with pe:javascript or p:ajax. There is only one event "reached". A callback function called when the user scrolls past the element. In the callback function you can access the scrolling direction ("down", "up", "right", "left") and the current waypoint element as a DOM object.

Based on Waypoints JS by Caleb Troughton.
Components and more
Documentation pe:waypoint
Attributes (move mouse over the names to see data types)
Name Description
id Unique identifier of the component in a namingContainer.
rendered Boolean value to specify the rendering of the component, when set to false component will not be rendered.
binding An EL expression referring to a server side UIComponent instance in a backing bean.
widgetVar Name of the client side widget.
for The target component registered as waypoint. If null, the parent component will be taken as target. Default is null.
forContext The context defines which scrollable element the waypoint belongs to and acts within. It can be a component or plain HTML element like a div. Default is window if nothing specified.
enabled If false, this waypoint will be created but will be disabled from triggering. You can call widget's method "enable" to turn it back on. Default is true.
horizontal Default waypoints live on the vertical axis. Their offset is calculated in relation to the top of the viewport and they listen for vertical scroll changes. If horizontal is set to true, offset is calculated in relation to the left of the viewport and listens for horizontal scroll changes. For instance, the value 50 means "when the left side of this element reaches 50px from the left side of the viewport". Default is false.
offset This option determines how far the top of the element must be from the top of the viewport to trigger a waypoint (callback function). It can be a number, which is taken as a number of pixels (can be also negativ, e.g. -10), a string representing a percentage of the viewport height (e.g. '50%') or a function that will return a number of pixels. Default is 0.
continuous If true, and multiple waypoints are triggered in one scroll, this waypoint will trigger even if it is not the last waypoint reached. If false, it will only trigger if it is the last waypoint. Default is true.
triggerOnce If true, the waypoint will be destroyed when triggered. Default is false.
Events (move mouse over the names to see classes)
Name Description
reachedfired when the user scrolls past the element.
PrimeFaces Extensions Showcase - © 2011-2023,PrimeFaces: 14.0.5,PrimeFaces Extensions: 14.0.5,JSF: Apache MyFaces JSF-2.3 Core Impl 2.3.10,Server: jetty/9.4.36.v20210114,Build time: 2024-09-10 21:01