Gwt - how to restore the previous view

Say I have a gwt application with many widgets, and I have used them many times, so some dialogs open, some radio buttons are checked, etc. Then I go to another website and click the back button, but I see that the previous view is lost. What are the ways to restore it? One note: if it is related to the gwt history engine, I don’t want to log every action in it.

Thanks in advance

+3
source share
1 answer

Well, History is the recommended way to handle such situations. Since you cannot refresh the page, you cannot transfer data through POST.
One solution that comes to my mind is to store information in a variable window.name. This is a “forgotten” variable that has no restriction on its contents (IIRC) and is not cleared when you go to another website. You will probably have to write JSNI code, here are some links on this topic: link1 , link2 , Google for more;)
But you would do the same for the story - the only difference is that the user will not see, perhaps a long URL. But do you really need to remember all these values? This is understandable for moving between views within the application, but when the user moves away from the site and returns, he / she does not expect the values ​​to be remembered (and this can be confusing and a possible security hole).

+1
source

Source: https://habr.com/ru/post/1759706/


All Articles