In a JSF 2.0 context, session.getMaxInactiveInterval() returns the session expiration remnant time, a static way.
Is there any workaround allowing one to display the remaining time in realtime?
Something like a system thread.
In my Web app, I am using a primeFaces component (a modal dialog) that shows itself after a certain time of user inactivity (tmeout) displaying a message “Are you there?”.
Actually, what I want is to add something like the following to that dialog:
<h:outputText id="remainder" value="#{sessionEar.maxInactiveInterval}" >
<f:ajax execute="@form" render="remainder" event="????"/>
</h:outputText>
So the idea is to re-render the <h:outputText /> each 5 seconds or each 60 seconds (1 minute : supposing showing the seconds in real time is not that easy)! So that it updates the remnant time before session expires.
How can I do this? Otherwise, do you have any better solution?
I finished using PrimeFaces Poll component which is straight fit.