10

We have a force.com site and have a 50 step multi wizard. We want to mimic the current salesforce session time out alert where a popup would be displayed to an user if the user is idle and logged in and not doing anything for say 15 minutes. Currently you have session management in the org which does not apply to force.com site. Can anybody share some code to handle session time out on force.com sites? We are not using default salesforce template which makes it hard as well? Buyan

2
  • I don't have any code to share, but JS has a time function you can utilize as a basis for building the code you need. If you google javascript timer or timeout functions, a LOT will come up. – crmprogdev Jun 11 '13 at 21:08
  • Hi Guys,Do you have sample script for an idle timer on a visual force page? – Buyan Thyagarajan Jun 14 '13 at 3:47
3

Can't help you with JS code, but I can with APEX. There's a freebie Stop Watch class that's part of Apex Utilities which you can get from either the App Exchange or get the source code here. If you downloaded the source code, I'd think you could readily incorporate portions of it into a custom controller for your wizard.

3
  • Stop Watch class? Sounds interesting...what Apex class is that? Thanks – Phil Hawthorn Jun 17 '13 at 16:07
  • Check out the code. Its listed on the Developer Force Code Share as the apex-lang project owned by Richard Vanhook. There's some useful code there licensed under the Apache Commons. – crmprogdev Jun 17 '13 at 20:52
  • Sounds like using this with periodic JS remoting calls or apex:actionTimer calls to check the status would work nicely. – Matt Lacey Oct 16 '13 at 2:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.