Author: tandraschko
Date: Fri Feb  7 16:19:45 2014
New Revision: 1565712

URL: http://svn.apache.org/r1565712
Log:
window handling docu...

Modified:
    deltaspike/site/trunk/content/jsf.mdtext

Modified: deltaspike/site/trunk/content/jsf.mdtext
URL: 
http://svn.apache.org/viewvc/deltaspike/site/trunk/content/jsf.mdtext?rev=1565712&r1=1565711&r2=1565712&view=diff
==============================================================================
--- deltaspike/site/trunk/content/jsf.mdtext (original)
+++ deltaspike/site/trunk/content/jsf.mdtext Fri Feb  7 16:19:45 2014
@@ -19,7 +19,7 @@ Notice:    Licensed to the Apache Softwa
 [TOC]
 
 ***
-# Multi-Window Handling
+# Multi-Window Handling (TODO)
 
 ## Intro
 
@@ -27,25 +27,67 @@ Notice:    Licensed to the Apache Softwa
 
 ### CLIENTWINDOW
 
+Each GET request results in an intermediate small html page which checks if 
the browser tab fits the requested windowId.
+
+TODO
+
+#### Change windowhandler.html
+
 ### LAZY
 
+Always appends the windowId to all, from JSF generated, URLs.<br/>
+On the first GET request without a windowId, it will generate a new windowId 
and redirect, with the windowId in the URL, to the same view again.<br/>
+The current windowId will be stored in the `window.name` variable on the 
client side. <br/>
+For all further requests, a lazy check will be performed to check if the 
windowID in the URL is matching with the `window.name.`
+If it's not matching, the view will be refreshed with the right windowId in 
the URL.
+
+#### Examples
+
+##### First GET request with windowID
+  - Renders the view
+  - Stores the windowId as `window.name` on the client side
+
+##### First GET request without windowID
+  - Redirect to the same view with a new windowId in the URL
+  - Renders the view
+  - Stores the windowId as `window.name` on the client side
+
+##### Further GET request with windowID
+  - Renders the view
+  - Checks if the requested windowID matches the `window.name`
+  - If it does not match, reload the URL with the right windowId taken from 
`window.name`
+
+##### Further GET request without windowID
+  - Redirect to the same view with a new windowId in the URL
+  - Renders the view
+  - If it does not match, reload the URL with the right windowId taken from 
`window.name`
+
+TODO: Contra
+
 ### NONE
 
+Any window or browser tab detection will be disabled for the current 
request.<br/>
+Scopes like @WindowScoped, @GroupedConversationScoped or @ViewAccessScoped 
will not work.
+
 ### DELEGATED
 
+Delegates the complete window handling to thew new JSF 2.2 ClientWindow (if 
not disabled).
+
 ### CUSTOM
 
+Enables to use an complete own 
`org.apache.deltaspike.jsf.spi.scope.window.ClientWindow` implementation.
+
 ## Configuration
 
 ### ds:windowId
 
-The component `ds:windowId` (`xmlns:ds="http://deltaspike.apache.org/jsf"`) is 
required to enable the full control of the DeltaSpike window handling.
-It will import and render the required script parts for both `LAZY` and 
`CLIENTWINDOW` mode.
+The component `ds:windowId` (`xmlns:ds="http://deltaspike.apache.org/jsf"`) is 
required to enable the full control of the DeltaSpike window handling.<br/>
+It will import and render the required script parts for both `LAZY` and 
`CLIENTWINDOW` mode.<br/>
 The best way, to apply it for all views, is to add this component to all of 
your templates.
 
 ### Switch Mode
 
-To switch the mode, you can just provide a DefaultClientWindowConfig or 
ClientWindowConfig:
+To switch the mode, you can just provide a 
`org.apache.deltaspike.jsf.spi.scope.window.DefaultClientWindowConfig` or 
`org.apache.deltaspike.jsf.spi.scope.window.ClientWindowConfig`:
 
     :::java
     @Specializes
@@ -60,7 +102,7 @@ To switch the mode, you can just provide
 
 ### Provide a custom ClientWindow
 
-If you would like to provide an custom ClientWindow implementation, you can 
just do it e.g. via CDI alternatives:
+If you would like to provide an custom 
`org.apache.deltaspike.jsf.spi.scope.window.ClientWindow` implementation, you 
can just do it e.g. via CDI alternatives:
 
     :::java
     @ApplicationScoped
@@ -78,7 +120,7 @@ Don't forget to set the ClientWindowRend
         @Override
         public ClientWindowRenderMode getClientWindowRenderMode(FacesContext 
facesContext)
         {
-            return ClientWindowRenderMode.LAZY;
+            return ClientWindowRenderMode.CUSTOM;
         }
     }
 


Reply via email to