History Management (refresh button)

Please give me an idea of ​​data management in GWT. I use Gwt in the project of my travel portal, and my web pages are linked to the previous page data, but when I click the browser refresh button, then my data is lost. so please tell me if there is a way to handle this problem.

+3
source share
4 answers

The GWT history class cannot be used to control page refresh (backward / forward only).

Click the update button, send a request to the server, and the application status will be restarted from the server. All this. You have to deal with this.

, , .

+1

, HTML5 localStorage .

.

+1

url .

= "ny"; History.newItem( " =" + );

URL- www.example.com # location = ny

, , URL- , ny.

.

History.newItem( " =" + startLocation + "& =" + endLocation); URL- www.example.com # start = newyork & end = boston

+1

, URL ( URL #) - your-site.com/app#page-1

, GWT History. , / .

, , URL #page-1 vs #page-2 ..

A more generalized and scalable solution for this is similar to gwt-platform Place (along with presenters, which are also a good idea for large applications)

0
source

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


All Articles