spread sheet session timeout

UI Components for JSF
Post Reply
wwperseo
Posts: 15
Joined: 25 Jun 2010, 15:24

28 Nov 2010, 16:01

Hi. i'm use spread sheet component, but my session time of my application is 15 minutes, i work with spreadsheet more 15 minutes and my aplication show me the ViewExpiredException, thnaks any ideas.

yarosla
Posts: 5
Joined: 28 Nov 2010, 17:35

28 Nov 2010, 17:54

You can setup javascript on your page which sends dummy requests to the server say every 5 minutes. This would keep your session alive while browser window is open.

Something like this:

Code: Select all


function pingServer() {
  new Image().src='pixel.gif?rnd='+Math.random();
}

setInterval(pingServer, 300000);

Make sure there is pixel.gif in your app's directory.

yarosla
Posts: 5
Joined: 28 Nov 2010, 17:35

28 Nov 2010, 18:24

Or you can use <p:poll> component to send ajax requests at given interval.

Code: Select all

<p:poll interval="300" process="@none"/>
That's it. Although much more resource intensive than pixel.gif retrieval.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

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