Comfort message on redirect

When redirecting (e.g. to PayPal) I use something like:

ui.getSession().close(); UI.getCurrent().getPage().setLocation(newLocation); but when the destination server takes time to respond I don’t get any indication that anything’s happening, and any Notifications I raise are lost.

Is there a clean way to show a comfort message like “Redirecting…” before making the redirect?


You could try using some Javascript with getPage().getJavaScript().execute(script); and try to blank the page and add some text or create some popup with pure javascript. That might work.

Ok I lost my way a bit there, partly due to making some allowances for Push mode.
It seems if I do, msg, Type.HUMANIZED_MESSAGE);
UI ui = UI.getCurrent();

It ends well.

Ah ok thanks, will go there if I get any more trouble. Much appreciated.