Orbeon session management

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Orbeon session management

ahenket
Orbeon Forms work based on a session with the xforms-server. When the session expires, the form becomes unresponsive, and as of later versions of Orbeon you also get a pretty impressive English language dialog - screenshot attached. This dialog presumable is triggered by the HTTP 403 from the xforms-server.

My question is:

Can I observe some event that indicates my session is expired, or as a derivative measure, can I observe when a call to xforms-server leads to an HTTP 403?

I would like to do a couple of things upon detection:

- Destroy/empty the session properties I set when I start a session
- Show a custom dialog offering the user to login again

I know how to set/unset session properties and offer dialogs, but I'm missing the hook for session management.

Thanks,

Alexander Henket

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

Schermafbeelding 2018-09-20 om 17.19.59.png (306K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Orbeon session management

Alessandro  Vernet
Administrator
Hi Alexander,

You can disable the standard error dialog, and register your own JavaScript code to be notified when an error happens, so you can do your own handling (see link below). Would this enable you to implement what you have in mind?


-Alex

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Orbeon session management

ahenket
I had been looking for info in the docs but did not find that page. Excellent! I'll let you know if I can't handle it.

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Orbeon session management

ahenket
So... I've been able to manage my own dialog. The documentation is outdated/incorrect:
  1. The original dialog is in orbeon-core.jar for ORBEON 2017.2.2
  2. You can only get your own dialog to show if you leave the property oxf.xforms.show-error-dialog to true
After toying a little with my own dialog, I found that effectively the first thing I want to do for lost sessions is to offer a localized error-dialog that allows a new login. While most parts of Orbeon are localizable, the error-dialog is not. I would happily provide you with the Dutch text for it, if you could accommodate that the right version is loaded like you do for other localizable parts.

Would that request be worth considering? I'm not talking about changing the current dialog, just providing i18n capabilities for it.

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Orbeon session management

Alessandro  Vernet
Administrator
Hi Alexander,

The mechanism we have for localization is only at the level of XBL or Form
Runner. So we can't localize the existing dialog, but we could create a new
one, in XBL, and maybe have it hooked by default if Form Runner is used. And
maybe even have that dialog be specifically for expired sessions, which is a
special case (per #989). Would something along those lines work for you?

https://github.com/orbeon/orbeon-forms/issues/989

-Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Orbeon session management

ahenket
Understood. I see that issue 989 has been open for quite some time. I've
added my $.02 to it.

The minimum thing I'd like to see is a localized version of the default
dialog, but that will effectively just let lead the user to refresh his
window, when all that's necessary is a new login.

So a localized dialog is useful, but more control for me as app designer
e.g. through an event that I can observe would be best.

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Orbeon session management

Alessandro  Vernet
Administrator
Got it Alexander, I've seen your response on that issue #989, and did
follow-up there. So we can continue the discussion there, as it relates to
#989.

https://github.com/orbeon/orbeon-forms/issues/989

-Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet