Skip to content

Note about Vaadin-Refresh #4254

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: latest
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions articles/flow/advanced/modifying-the-bootstrap-page.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,20 @@ public class AppShell implements AppShellConfigurator {

Modifications in [methodname]`AppShellConfigurator.configurePage()` have priority over the equivalent annotations. Annotations don't cover all of the cases that can be achieved when overriding the [methodname]`AppShellConfigurator.configurePage()` method.

==== Forcing a Page Reload After an Invalid Server Response[[vaadin-refresh]]

If the XHR response can't be parsed as JSON, Vaadin looks for a “Vaadin-Refresh” string anywhere inside the response text. If it's present, Vaadin reloads the page instead of showing an error message. You can add the refresh token as a meta tag.

[source,java]
----
public class AppShell implements AppShellConfigurator {

@Override
public void configurePage(AppShellSettings settings) {
settings.addMetaTag("refresh", "Vaadin-Refresh");
}
}
----

=== `IndexHtmlRequestListener` Interface [[IndexHtmlRequestListener-interface]]

Expand Down