(GWTP) Can "placeManager.revealPlace(request)" open a URL in a new Tab?

StackOverflow https://stackoverflow.com/questions/23320442

  •  10-07-2023
  •  | 
  •  

Pergunta

In GWTP, to open a URL in a new tab, we can use this:

PlaceRequest request =new PlaceRequest(NameTokens.getorder).with("myID", myID);
String url =
Window.Location.createUrlBuilder().setHash(placeManager.buildHistoryToken(request)).buildString();
Window.open(url, "_blank", null);

Can we not to use Window.open & just use placeManager to achive the same thing (ie open a URL in a new Tab).

PlaceRequest request =new PlaceRequest(NameTokens.getorder).with("myID", myID);
placeManager.revealPlace(request);
// this code will open the url (ex: mydomain.com#getorder;myID=15 ) in the current browser.

The problem of Window.open(url, "_blank", null); is that sometime it opens to new tab & sometime it opens to a new Window which is inconsistent.

Foi útil?

Solução

Try this one

Window.open(url, "", "");

or

Window.open(url, "", null);
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top