aboutsummaryrefslogtreecommitdiffstats
path: root/documentation/articles/CreatingMultiTabApplications.asciidoc
diff options
context:
space:
mode:
authorErik Lumme <erik@vaadin.com>2017-09-13 15:07:25 +0300
committerErik Lumme <erik@vaadin.com>2017-09-13 15:07:25 +0300
commit9ebc0be4e7d3bc6811ba3e86bc6a2da270bdcb76 (patch)
treef8a60658ac3916b3180bf44d4499f2bb2cb47176 /documentation/articles/CreatingMultiTabApplications.asciidoc
parentfaf7bddfcdfc12463e52fc2f84751a2afa3f75ae (diff)
downloadvaadin-framework-9ebc0be4e7d3bc6811ba3e86bc6a2da270bdcb76.tar.gz
vaadin-framework-9ebc0be4e7d3bc6811ba3e86bc6a2da270bdcb76.zip
Migrate AddingASplashScreen and CreatingMultiTabApplications
Diffstat (limited to 'documentation/articles/CreatingMultiTabApplications.asciidoc')
-rw-r--r--documentation/articles/CreatingMultiTabApplications.asciidoc29
1 files changed, 29 insertions, 0 deletions
diff --git a/documentation/articles/CreatingMultiTabApplications.asciidoc b/documentation/articles/CreatingMultiTabApplications.asciidoc
new file mode 100644
index 0000000000..1c04f77d81
--- /dev/null
+++ b/documentation/articles/CreatingMultiTabApplications.asciidoc
@@ -0,0 +1,29 @@
+[[creating-multi-tab-applications]]
+Creating multi-tab applications
+-------------------------------
+
+Every new request to the server gets a new session and UI instance.
+Having the application open in separate tabs or windows means that the
+instances are totally separate from each others, and thus won't conflict
+and cause any out of sync or similar issues.
+
+Opening the new tab will open the application into it's start page. Use
+URI fragments if you want to open a specific view into the secondary
+tab. You can read the URI fragments in the `UI.init()` and decide if you
+want to show the main view or a specialized view:
+
+[source,java]
+....
+public void init(VaadinRequest request) {
+ String person = request.getParameter("editPerson");
+ if (person == null) {
+ setContent(new MainView());
+ } else {
+ setContent(new EditPersonView(person));
+ }
+}
+....
+
+More examples on URI fragments and parameters can be found at:
+
+* link:UsingURIFragments.asciidoc[Using URI fragments]