Page refresh to same page if the dataview of that page is a non-persistable entity

0
I have been using a non-persistable entity as my data view on a page, and I want to ensure that when a user refreshes the page, they are directed to the same page and not the homepage. What I've tried: I downloaded the Set URL widget from the marketplace modules and created a nanoflow that calls a JavaScript action with mx.reload("URL of that page"). However, it returns an error saying 'no webpage found for this address' . Additionally, I attempted to implement a custom refresh, but it does not function the same way as a browser-level refresh. How can I achieve this? I can not make the entity as persistent.
asked
2 answers
0

You can try adding some information to the current session of the user.

When the user navigates to your page, create a non-persistable object that stores the user’s current location (i.e., the page they navigated to).Link this object to the current user or a specialization of user.

Then, when the user refreshes the page, you can use the navigation logic of your app to check whether there’s any stored navigation info for the current user. If such info exists, automatically navigate the user back to that page.

To make this work consistently, you’ll need to add this generic logic to all your navigation flows, or you can reset this navigation info when the user navigates away from your page

answered
0

If you set page URLs for each page, this should work - a refresh will simply bring the person back to the page they were already on.

 

image.png

answered