Session handling in 4D Qodly Pro

Ever wanted full control over what happens when a user’s session expires, without wrestling with fixed behaviors or bolting on your own timeout logic? Not by maintaining custom timers, juggling tokens, or hoping the UI guesses what the backend is doing?

Session handling in 4D Qodly Pro gives you a pair of application events you can wire into your own UX. One warns the user before the cutoff, the other fires when the session is officially gone. You decide what they trigger.

on session Expired Reminder

Triggered after a configuration period of inactivity. This allows you to propose to the user an action to prolong their session. 

The UI can respond however you want, while state, security, and rules stay on the server side. Clear boundaries, predictable behavior, and a smoother end to every session.

You can add onSessionExpireReminder and set the inactivity delay in minutes. This event fires before the cutoff, giving you a chance to prompt or redirect the user.

blank

on session Expired

Triggered when a user action, followed by a request to the 4D server, fails due to an expired session.

It can occur when the server restarts or the user has been inactive for a long time.

This way, you can, for example, redirect the user to a login page when his session expires

blank

Open the contextual panel of any component, switch to the App events tab, and add onSessionExpired to define what your app should do when the session is no longer valid.

 

blank

Takeaway

With onSessionExpiredReminder and onSessionExpired, 4D Qodly Pro gives you the tools to warn, guide, and recover with precision. You control the experience, the server enforces the rules, and your application behaves consistently in every scenario.

A smoother ending is still part of a great user experience.

 

Mourad Aouinat
Mourad Aouinat joined 4D as a full-stack developer in June 2020. He is responsible for designing the layout of web applications and user interfaces, as well as gathering and refining specifications and requirements based on technical needs. Mourad is a self-taught developer with a background in economics and finance, and a strong passion for open-source software and user experience.