kushal Baldev
kushal Baldev

Reputation: 769

Is there any Way to replace the window.open for vaadin 14 to redirect to external url?

I am looking for the substitution for the redirection as in safari and Firefox pop ups are blocked by default.

The things I have used is

  1. open method of vaadin which indirectly uses the window.open
  2. I know that the anchor Component can do the task but that will be costly for me as I have used the buttons and Image Component in the project so setting anchor will be hard for me.

Any suggestions will be great help to me.

Upvotes: 1

Views: 279

Answers (1)

Tatu Lund
Tatu Lund

Reputation: 10643

The opening of the browser window needs to be connected to user action and happen on client side code, hence some JavaScript is needed. There is an Browser Opener add-on for Vaadin 10+ which wraps this together.

Upvotes: 2

Related Questions