Monday, September 18, 2017

Reloading the existing browser Tab when the user tries to open same in GWT?

I have a one GWT application which contains 3 modules. The user can switch from one module another module by using buttons.

The user can access the modules in the following ways:

 1) The user can enter the URL in the browser like below:
  Ex: http://localhost:1045//app1
 2) Clicking on the button once any of the 3 modules are already opened using above stpe 1:
  
   On button click: Window.open("http://localhost:1045//app2", "app2Window", "");
  So the app2 will be opened in the another tab.

Now If the user opens app1 by entering the module url in the browser and then click on the button to open the app2
in the new tab.

So We have two tabs with two modules(app1, app2). 

Now the actual issue is:

If the user clicks on a button(to open "app1") in the 2nd tab with "app2". The new tab is opened instead of loading the
existing tab with "app1".

How to avoid opening the new tab? I saw the window name will differentaiate the tab is opened or not?
But I was not able to find the method to name the window when the user enters the url in the browser?

How Can I achieve this GWT?

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment