My use case is actually from the standpoint of an Oracle APEX developer. I'm on version 18.2.
I am working on a single-page application. Every time I run my APEX application from Page Designer, I want the session state of my application to essentially reset. Item values should all start out as NULL, or at their defaults.
I've been playing with a Dynamic Action on Page Load, but that's overkill: if I'm testing multi-step series of operations, simulating an end user, across those actions I want session state retained. But every time I make development changes in Page Designer and then click the "Run" button to launch my application, I want a clean slate.
Is it possible? How do I go about it?
Thanks.
How about a simple workaround?
I understand this is a one-page application. Let's call it Page 1. OK, that's what the final result will be.
But, for testing purposes, create another page (Page 2) and a button on it which will perform redirection to page in this application (the one you're working on - Page 1).
Link Builder contains the Clear session state section which lets you specify which page's session state you want to clear - obviously, that will be Page 1.
Basically, you'd make changes to Page 1, but run Page 2 and push the button to go to Page 1. Its session state will be cleared and let you do any tests you want.
Related
I created an empty application with project sample database in apex with administration and access control features.
Every time I create a new page for a table and want to run it, the page does not appear in navigation menu and when I run it from page editor an error occurs. (Report, master Report and etc.)
This problem does not happen in another applications I have.
Does anyone know why?
Something went wrong with the application creation process (perhaps an error occurred) or afterward to the application metadata (corrupted somehow).
When I created another new application, it worked fine.
I am working on a project with Oracle APEX. There is one thing that I am not able to figure out.
When I create a form and add data to it and run my application it keeps the data in itself so when I try to run it again it still has the data from the last user.
How do I change that and stop the form retaining the data?
When you create a branch on the page you can provide the page numbers which cache you want to be cleared with the "clear cache" attribute.
When a page is submitted, make sure it triggers a branche where you set this attribute.
As #Non Plus Ultra said, you can use the Clear Cache attribute of a branch, or you can add a "reset page" Process to run when the page is submitted. Which method you use depends on what navigation paths you wish the page reset to happen.
Option
1)Clear Cache --Go to page --> edit page(top left first option after clicking)-->in edit page at bottom some where you will see Clear.
2) create Branch when page renders set rest page in it.
i would suggest option one
I have a few pages in an Application that require A-Synchronous calls to be made for about 2-3 minutes to get Synchronized, the user may navigate away from that page during Synchronization and can come back again after visiting multiple pages and the sync continues all the time he is on other pages as well, when I go to a page from sync-page and press the Back button everything works fine.. but when i go to a page and navigate back to sync-page from Application Bar a new Instance of the Page is created and the Sync is just like Re-started.
Now i know every thing is working fine since new instance of a page is created when i call NavigationService.Navigate() , but what should i do in this scenario ? How to get the old instance of a page if it is there ?
Thanks...
You can't get an "old" instance of a page and it's not guaranteed that a backwards navigation will reload the previous instance of the page, it may be a new instance of the same page, but restored to the same state (assuming you saved any).
If you are trying to provide backwards navigation from the application bar then a) you probably shouldn't because that's what the back button is for, and b) you should make sure you use NavigationService.GoBack() instead of NavigationService.Navigate() because Navigate will always launch a new instance of your page.
If the page you want to get to is not the previous page, then it sounds like you are trying to implement non-linear navigation for which there is a recipe on the App Hub.
By the sounds of your scenario, you should handle this long running process separately (away from the view) and then display it's progress or results in a view when the user navigates to the relevant page.
I am implementing a web application using ASP .Net and C#. One of the pages has a requirement that it always needs to be fetched from the server, rather than from the local browser cache. I have been able to achieve this.
We have a back button in the application, which simply invokes javascript:history.back() method. The problem is that when the back button is clicked to navigate to the page which is always to be reloaded from the server, the browser displays a "Web page expired message".
The intent here is to force the browser to reload the page rather than display the web page expired message.
Any help would be highly appreciated. Thanks a ton in advance.
You will probably need to change the implementation to make the browser load the URL explicitly:
window.location.href = 'http://....';
instead of invoking the back button, since the intention of the back button is to get the last page from the cache.
(If browsers would not act that way, they would re-send your form data multiple times when using the back button during a registration process or similar.)
You mean you want to control browser behaviour, which is not possible. I doubt you can solve it that way. You could set the expiration time to a small value (1 minute perhaps?) so that the page is still valid if one navigates back quickly.
I have a web application (Java, Websphere, JSP) which allows co-workers to register visitors to various company exhibitions. A user object is stored in the session which records the currently selected exhibition and this is used when entering the details of new visitors.
One user has decided to open a second browser window which seems to share the same session. The user browses to an other exhibition in the second window. This changes the state of the currently selected exhibition. Back in the first window a menu item is clicked: 'List visitors'. The resulting list is a list of visitors to the exhibition selected in the second window.
I know that I could add the exhibition id to every form on every page but my actual scenario is more complicated that the one I have described.
What is your stategy for dealing with this kind of problem?
My first guess would be you can avoid the problem by keeping (or perhaps only identifying) view state in the URL and not the session.