While developing a web traditional application with a list page with filters, list sorts and list pagination, an issue was identified when navigating back from a record detail page to the list screen.If the user decided to use the browser back button instead of a link in the page to navigate back to the list page, the previously search applied to the list was lost or sometimes the search appeared with the correct value but with wrong values displayed in the list.
After some investigation, we noticed that with browser back or forward navigation, the page was not re-runing the preparation. Instead, it was restoring a cached version from the browser.
For that reason, a component was developed to run a script to detect the navigation type and if detected a back/forward navigation, the page is reload.
How to use the component:Just drag and drop the web block for your page layout or if only needed in some scenarios, drag and drop to the content of each page.
For more information, a demo app is available where it is possible to test both scenarios:
a) a list screen without the reload pattern. Apply filters, change pagination, sorts, navigate to the employee detail screen and navigate back using the browser and check the result.
b) a list screen with the reload pattern. Apply filters, change pagination, sorts, navigate to the employee detail screen and navigate back using the browser and check the result.