问题
In my web app I am changing locale in settings and I found out the locale change takes effect only after pressing F5
button or Ctrl + R
. I have tested different approaches to programmatically make equal refresh (one that changes locale), but no success on that. What is the programmatic equivalent to that refresh event?
I tried Window.Location.reload();
with no desired effect.
回答1:
F5 i.e Ctrl+R equivalent via GWT is com.google.gwt.user.client.Window.Location.reload();
- Just ensure you are using the right Window import.
- Read reference for the reload documentation.
来源:https://stackoverflow.com/questions/15292110/how-to-give-a-refresh-equal-to-ctrl-r-in-gwt-web-app