A few words about session timeout.
If the logic of the application does not require frequent reloading (submitting) of the page (for example, all information manipulating and retrieving are made using AJAX calls), and the session has expired, the latest available at the moment version of Apex (4.2.6) does not behave as we would like. Partial page refresh leaves no error messages, except one thing: updated regions are empty. Quick look at the apex.server implementation gives the answer why this happens. Session expiration errors has not yet processed. If you take a look
at the body of the response to the POST request to region refresh , you’ll see a message about an incorrect password /user name in the body of the response, but it is hard to do something with it. Application developers are trying to solve this problem by using a plugin from SkillBuilders or something like that, or try to override apex.server for handling an ajax request error. Using the plugin masterdetail, you can also encounter this problem. One of the possible solution is the creation of dynamic action, which are looking for an empty region after the report refresh, and when it happens, reloads the page, then the user is automatically redirected to the registration page.
So, if you use classic reports on your page, you can do following:
Plugin works in application which utilize 26 theme. Other themes may require changing of js code or jQuery selector.
If the logic of the application does not require frequent reloading (submitting) of the page (for example, all information manipulating and retrieving are made using AJAX calls), and the session has expired, the latest available at the moment version of Apex (4.2.6) does not behave as we would like. Partial page refresh leaves no error messages, except one thing: updated regions are empty. Quick look at the apex.server implementation gives the answer why this happens. Session expiration errors has not yet processed. If you take a look
at the body of the response to the POST request to region refresh , you’ll see a message about an incorrect password /user name in the body of the response, but it is hard to do something with it. Application developers are trying to solve this problem by using a plugin from SkillBuilders or something like that, or try to override apex.server for handling an ajax request error. Using the plugin masterdetail, you can also encounter this problem. One of the possible solution is the creation of dynamic action, which are looking for an empty region after the report refresh, and when it happens, reloads the page, then the user is automatically redirected to the registration page.
So, if you use classic reports on your page, you can do following:
- Create dynamic action on page load with "Execute Javascript Code" true action
- Add "Execute Javascript Code" "True" action with code like
- That's all.
Plugin works in application which utilize 26 theme. Other themes may require changing of js code or jQuery selector.
No comments:
Post a Comment