0
votes

I have a strange issue. I have created something like XControl application where in you can preview your documents (but using Managed beans). Now there is an edit link which opens the document in edit mode in XPage in a dialog. This page shows different buttons based on user role and document status. Now, I preview a document and keep that window idle for sometime. When click on edit link, document opens fine in edit mode but buttons are not rendered properly. Seemingly it forgets the user role. I think this must got something to do with "Keep current page in memory" setting. I am going to try out the "Keep pages on disk" setting but any idea or anyone faced similar issue?

1
It could also be the session scope that has timed out. Do you use a session scoped bean to determine when to render the buttons?Per Henrik Lausten
I have one session scoped bean which is used at various places in application but for rendering the buttons. I'll change that to application scope (configuration items) and watch out for this behavior. Thanks for the pointer.Arun

1 Answers

0
votes

As the others have mentioned, the XPages session has almost certainly timed out. Keep Session Alive control, apparently, does not resolve this. Something like the debug toolbar, which can display the scoped variables, will confirm this.

Session timeout can be configured in Xsp properties, but bear in mind the larger the time, the longer before sessions are discarded after users legitimately close the browser (browsers don't tell servers when they close!). Another option is to check the user against a sessionScoped variable for each request and, if it's different, re-initialise it.