deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tandrasc...@apache.org
Subject deltaspike git commit: DELTASPIKE-966 Document ClientWindow configuration
Date Tue, 28 Jul 2015 13:40:24 GMT
Repository: deltaspike
Updated Branches:
  refs/heads/master 1cadbf066 -> 02c0e19d5


DELTASPIKE-966 Document ClientWindow configuration

Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/02c0e19d
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/02c0e19d
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/02c0e19d

Branch: refs/heads/master
Commit: 02c0e19d5fa812bf00722cf192c22c7bc73b2be2
Parents: 1cadbf0
Author: Thomas Andraschko <tandraschko@apache.org>
Authored: Tue Jul 28 15:40:15 2015 +0200
Committer: Thomas Andraschko <tandraschko@apache.org>
Committed: Tue Jul 28 15:40:15 2015 +0200

----------------------------------------------------------------------
 documentation/src/main/asciidoc/jsf.adoc | 53 +++++++++++++++++++++++++--
 1 file changed, 50 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/02c0e19d/documentation/src/main/asciidoc/jsf.adoc
----------------------------------------------------------------------
diff --git a/documentation/src/main/asciidoc/jsf.adoc b/documentation/src/main/asciidoc/jsf.adoc
index 5796e32..bf3d113 100644
--- a/documentation/src/main/asciidoc/jsf.adoc
+++ b/documentation/src/main/asciidoc/jsf.adoc
@@ -131,9 +131,9 @@ not feasible as general solution.
 
 Each GET request results in an intermediate small html page which checks
 if the browser tab fits the requested windowId. When the windowId is
-valid, a unique token (called `dsRid`) will be generated for the current
+valid, a unique token (called `dsrid`) will be generated for the current
 request and added to the URL. In addition a cookie with with the
-dsRid/windowId will be added. On the server side, the verified windowId
+dsrid/dswid will be added. On the server side, the verified windowId
 will be extracted from the cookie. For POST request detection, the
 windowId will be added as hidden input to all forms.
 
@@ -159,7 +159,9 @@ parse a request and decide upon the UserAgent or any other information
 if a client will get an intermediate page or if he gets the result page
 directly.
 
-===== Change windowhandler.html
+===== Configuration
+
+====== Change windowhandler.html
 
 To customize the look and feel of the windowhandler.html, you can simply
 provide a own via:
@@ -177,6 +179,51 @@ public class MyClientWindowConfig extends DefaultClientWindowConfig
 }
 -------------------------------------------------------------------
 
+If you didn't copy the JS logic from our default windowhandler.html or
+if you would like to always show your custom html instead the 'screenshot', you should disable
logic via:
+
+[source,java]
+-------------------------------------------------------------------
+@Specializes
+public class MyClientWindowConfig extends DefaultClientWindowConfig
+{
+    @Override
+    public String isClientWindowStoreWindowTreeEnabled()
+    {
+        return false;
+    }
+}
+-------------------------------------------------------------------
+
+====== Minimize windowhandler.html streaming
+
+It's possible to reduce the windowhandler.html streaming if we overwrite the onclick event
of all links to mark the next request as 'valid'.
+The onclick handler appends a request token to the URL and creates a cookie for the request
token.
+
+You can enable this via:
+
+[source,java]
+-------------------------------------------------------------------
+@Specializes
+public class MyClientWindowConfig extends DefaultClientWindowConfig
+{
+    @Override
+    public String isClientWindowTokenizedRedirectEnabled()
+    {
+        return true;
+    }
+
+    /**
+     * This isn't required anymore when #isClientWindowTokenizedRedirectEnabled is set to
true.
+     */
+    @Override
+    public String isClientWindowStoreWindowTreeEnabled()
+    {
+        return false;
+    }
+}
+-------------------------------------------------------------------
+
 ==== LAZY
 
 Always appends the windowId to all, from JSF generated, URLs. On the


Mime
View raw message