28
Views
8
Comments
[SessionTimeout] how pop-up should come by keeping the data safe on screen.
sessiontimeout
Reactive icon
Forge asset by Prince Sebastiao

SessionTimeout(forge) >> When using this forge for session timeout pop-up the page is getting refreshed by which we are losing the data. The pop-up should come by keeping the data safe on screen. 

2026-02-25 07-20-39
P Anantha Raman

Hi @Jivendra Kumar

I believe I’ve identified the root cause of the issue related to the session timeout popup triggering a page refresh and resulting in data loss.
 
To further analyze and ensure an accurate fix, would it be possible for you to share the OML file of the application?

 This will allow me to review the implementation details (especially around the modal placement and session handling logic) and suggest the appropriate changes.

Thanks

 Ananth

2024-08-12 03-27-24
Jivendra Kumar

As I mentioned it's the forge component that we are using as it is in the application which is creating the issue.

2026-02-25 07-20-39
P Anantha Raman

I am trying to replicate the issue as you mentioned using the same  session timeout forge   it works fine for me.
What I have done - Doing simple CRUD operation. I am using the session timeout block in editing screen . 

while editing I am just keep it as idle for few minutes as per our site property value after ideal time exceed it shows popup in that time my form(edit value) value still exit.

Thanks
Ananth

2024-08-12 03-27-24
Jivendra Kumar

Okay...Steps on how you are implementing the forge in application?

Can you please also explain CRUD operation (specific)?

we are using this as common component in outsystems themes and then using it in the application on every screen as popup block.

2026-02-25 07-20-39
P Anantha Raman

Installed the forge component . Created add and edit screens by scaffolding an entity.

Forge Added as  dependency . And in Edit Screen just drag and dropped the sessionTimeout block.

Tested - while navigating to Edit screen, In that screen I used that block(sessionTimeout) my edited value is not get vanished.

Thanks
Ananth

2026-02-25 07-20-39
P Anantha Raman

Just try without forge component by the below steps

Create a Custom Block:

Use the same JavaScript code from the Forge component.

Implement the JavaScript code in the OnReady event of the custom block.

Configure Pop-Up Visibility:

Drag and drop the pop-up element into the custom block.

Use a Boolean variable to control the visibility of the pop-up.


Handle Warning Action:

In the JavaScript code, modify the OnWarning action to set the Boolean variable to true, thereby displaying the pop-up.


Integrate Custom Block:

Place the custom block inside the menu block of your application.

Check the implementation to ensure the data loss issue is resolved.

Thanks
Ananth

2024-08-12 03-27-24
Jivendra Kumar

Hi @Anantharaman P,

Thank you for your reply.
I would like to explain in detail want I have done so that you can correct me.
I took the Forge component code into my Theme common module so that I can use in any application that has request for session timeout.
I'm using this common component in 1 of my applications. It has 5 screens so in the end of every screen I called this block as popup. When I use the application and after certain time the pop-up comes on the screen and in back end the data is gone as the screen is getting refreshed.
Please guide me so that I don't lose the data that's already entered in my application. 
All the coding is done in common theme module only and through manage dependencies I used it in every screen of the application.
I also tried to add it in Menu or in Layouts which is common to every screen, but it is throwing error and application is not opening. I attached the OML that I used just added a logout button to below in addition.

Please suggest.

SessionTimeout.oml
2026-02-25 07-20-39
P Anantha Raman

Hi @Jivendra Kumar

As you mentioned, while trying to add the "SessionTimeout" block in the Menu or Layouts, which are common to every screen, I encountered an error. What error are you facing?

I created a small application with normal CRUD operations and used the SessionTimeout block in the Menu block, applying it to all screens.

When editing a record, the input fields retain their values, but after 5 seconds, a warning popup appears and the values in the input fields do not disappear. 

Please check if it works as per your scenario.

Kindly let me know if you find a solution. I have attached the OML file for reference. 

Note: I have just cloned the SessionTimeout block.


Attached image for your reference.


Thanks
Ananth

Setting.oml
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.