From 7a0a8b598945f4efa4c3b9526b5ce656f4218579 Mon Sep 17 00:00:00 2001 From: mukherjeesudebi Date: Mon, 14 Apr 2025 16:02:55 +0300 Subject: [PATCH 1/4] Vaadin-Refresh --- .../advanced/modifying-the-bootstrap-page.adoc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/articles/flow/advanced/modifying-the-bootstrap-page.adoc b/articles/flow/advanced/modifying-the-bootstrap-page.adoc index a10611ae7d..22a988f786 100644 --- a/articles/flow/advanced/modifying-the-bootstrap-page.adoc +++ b/articles/flow/advanced/modifying-the-bootstrap-page.adoc @@ -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. +==== Vaadin-Refresh[[vaadin-refresh]] + +If the XHR response cannot be parsed as JSON, Vaadin will look for a Vaadin-Refresh string anywhere inside the response text. If it's present, then Vaadin will reload the page instead of showing an error message. The refresh token can be added as meta tag. + +[source,java] +---- +public class AppShell implements AppShellConfigurator { + + @Override + public void configurePage(AppShellSettings settings) { + settings.addMetaTag("refresh", "Vaadin-Refresh"); + } +} +---- === `IndexHtmlRequestListener` Interface [[IndexHtmlRequestListener-interface]] From d84289a66fc28750d08797d21689e97c2e4e0ef3 Mon Sep 17 00:00:00 2001 From: mukherjeesudebi Date: Tue, 15 Apr 2025 16:45:37 +0300 Subject: [PATCH 2/4] updated vaadin-refresh description --- articles/flow/advanced/modifying-the-bootstrap-page.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/articles/flow/advanced/modifying-the-bootstrap-page.adoc b/articles/flow/advanced/modifying-the-bootstrap-page.adoc index 22a988f786..d42ee2433f 100644 --- a/articles/flow/advanced/modifying-the-bootstrap-page.adoc +++ b/articles/flow/advanced/modifying-the-bootstrap-page.adoc @@ -204,7 +204,7 @@ Modifications in [methodname]`AppShellConfigurator.configurePage()` have priorit ==== Vaadin-Refresh[[vaadin-refresh]] -If the XHR response cannot be parsed as JSON, Vaadin will look for a Vaadin-Refresh string anywhere inside the response text. If it's present, then Vaadin will reload the page instead of showing an error message. The refresh token can be added as meta tag. +If the XHR response cannot be parsed as JSON, Vaadin looks for a Vaadin-Refresh string anywhere inside the response text. If it is present, then Vaadin reloads the page instead of showing an error message. The refresh token can be added as meta tag. [source,java] ---- From 6669e0c6d37e4dd980053f661c4c0424eb95340d Mon Sep 17 00:00:00 2001 From: Jouni Koivuviita Date: Wed, 16 Apr 2025 11:36:29 +0300 Subject: [PATCH 3/4] edit language --- articles/flow/advanced/modifying-the-bootstrap-page.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/articles/flow/advanced/modifying-the-bootstrap-page.adoc b/articles/flow/advanced/modifying-the-bootstrap-page.adoc index d42ee2433f..e7b2a211c5 100644 --- a/articles/flow/advanced/modifying-the-bootstrap-page.adoc +++ b/articles/flow/advanced/modifying-the-bootstrap-page.adoc @@ -204,7 +204,7 @@ Modifications in [methodname]`AppShellConfigurator.configurePage()` have priorit ==== Vaadin-Refresh[[vaadin-refresh]] -If the XHR response cannot be parsed as JSON, Vaadin looks for a Vaadin-Refresh string anywhere inside the response text. If it is present, then Vaadin reloads the page instead of showing an error message. The refresh token can be added as meta tag. +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] ---- From 52585d19ba23d4905de87d5e2528932c1acd64a6 Mon Sep 17 00:00:00 2001 From: mukherjeesudebi Date: Thu, 17 Apr 2025 11:18:32 +0300 Subject: [PATCH 4/4] changed heading --- articles/flow/advanced/modifying-the-bootstrap-page.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/articles/flow/advanced/modifying-the-bootstrap-page.adoc b/articles/flow/advanced/modifying-the-bootstrap-page.adoc index e7b2a211c5..6e54a43146 100644 --- a/articles/flow/advanced/modifying-the-bootstrap-page.adoc +++ b/articles/flow/advanced/modifying-the-bootstrap-page.adoc @@ -202,7 +202,7 @@ 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. -==== Vaadin-Refresh[[vaadin-refresh]] +==== 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.