No Java Script Message.

Hi,
By default if vaadin detects that the browser has disabled javascript, it displays this message “You have to enable javascript in your browser to use an application built with Vaadin.”

Now instead of this message i want that i redirect the browser to a static html page lets say ‘nojavascript.html’ instead of displaying above message when javascript is disabled in browser, what should i do ???

Plz help,

Thanks,
Meet Parikh

You could rewrite the message by extending
AbstractApplicationServlet
and override getNoScriptMessage().

Redirecting with disabled javascript is a bit more tricky. Have not tried this out, but maybe you could add a meta refresh with 2sec timeout to the page (by overriding writeAjaxPageHtmlHeader) and then add some javascript (by overriding writeAjaxPageHtmlHeadStart) to the beginning of the page that would somehow cancel the meta refresh.

Thanks Joonas, really appreciated !!

how do you do this in vaadin 7?

The message is set in BootstrapHandler.setupMainDiv(…) - first see its source code. Then use a BootstrapListener to modify the HTML generated by BootstrapHandler - see
this tutorial
.