IdleMonitor - Ajax Behaviors

IdleMonitor can also invoke server side events with ajax behaviors in case user goes idle or active.

Source

<p:growl id="messages" showDetail="true" sticky="true" />

<p:idleMonitor timeout="5000">
    <p:ajax event="idle" listener="#{idleMonitorController.idleListener}" update="messages" />
    <p:ajax event="active" listener="#{idleMonitorController.activeListener}" update="messages" />
</p:idleMonitor>