Search code examples
javagwtpage-refresh

How to give a refresh equal to Ctrl+ R in gwt web app?


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.


Solution

  • F5 i.e Ctrl+R equivalent via GWT is com.google.gwt.user.client.Window.Location.reload();

    1. Just ensure you are using the right Window import.
    2. Read reference for the reload documentation.