deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r896759 - in /websites/staging/deltaspike/trunk/content: ./ jsf.html
Date Fri, 07 Feb 2014 16:21:09 GMT
Author: buildbot
Date: Fri Feb  7 16:21:08 2014
New Revision: 896759

Log:
Staging update by buildbot for deltaspike

Modified:
    websites/staging/deltaspike/trunk/content/   (props changed)
    websites/staging/deltaspike/trunk/content/jsf.html

Propchange: websites/staging/deltaspike/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Fri Feb  7 16:21:08 2014
@@ -1 +1 @@
-1565437
+1565712

Modified: websites/staging/deltaspike/trunk/content/jsf.html
==============================================================================
--- websites/staging/deltaspike/trunk/content/jsf.html (original)
+++ websites/staging/deltaspike/trunk/content/jsf.html Fri Feb  7 16:21:08 2014
@@ -80,11 +80,23 @@
               </div>
               <div class="toc">
 <ul>
-<li><a href="#multi-window-handling">Multi-Window Handling</a><ul>
+<li><a href="#multi-window-handling-todo">Multi-Window Handling (TODO)</a><ul>
 <li><a href="#intro">Intro</a></li>
 <li><a href="#available-modes">Available modes</a><ul>
-<li><a href="#clientwindow">CLIENTWINDOW</a></li>
-<li><a href="#lazy">LAZY</a></li>
+<li><a href="#clientwindow">CLIENTWINDOW</a><ul>
+<li><a href="#change-windowhandlerhtml">Change windowhandler.html</a></li>
+</ul>
+</li>
+<li><a href="#lazy">LAZY</a><ul>
+<li><a href="#examples">Examples</a><ul>
+<li><a href="#first-get-request-with-windowid">First GET request with windowID</a></li>
+<li><a href="#first-get-request-without-windowid">First GET request without windowID</a></li>
+<li><a href="#further-get-request-with-windowid">Further GET request with windowID</a></li>
+<li><a href="#further-get-request-without-windowid">Further GET request without
windowID</a></li>
+</ul>
+</li>
+</ul>
+</li>
 <li><a href="#none">NONE</a></li>
 <li><a href="#delegated">DELEGATED</a></li>
 <li><a href="#custom">CUSTOM</a></li>
@@ -153,21 +165,58 @@
 </ul>
 </div>
 <hr />
-<h1 id="multi-window-handling">Multi-Window Handling</h1>
+<h1 id="multi-window-handling-todo">Multi-Window Handling (TODO)</h1>
 <h2 id="intro">Intro</h2>
 <h2 id="available-modes">Available modes</h2>
 <h3 id="clientwindow">CLIENTWINDOW</h3>
+<p>Each GET request results in an intermediate small html page which checks if the
browser tab fits the requested windowId.</p>
+<p>TODO</p>
+<h4 id="change-windowhandlerhtml">Change windowhandler.html</h4>
 <h3 id="lazy">LAZY</h3>
+<p>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 <code>window.name</code> 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 <code>window.name.</code>
+If it's not matching, the view will be refreshed with the right windowId in the URL.</p>
+<h4 id="examples">Examples</h4>
+<h5 id="first-get-request-with-windowid">First GET request with windowID</h5>
+<ul>
+<li>Renders the view</li>
+<li>Stores the windowId as <code>window.name</code> on the client side</li>
+</ul>
+<h5 id="first-get-request-without-windowid">First GET request without windowID</h5>
+<ul>
+<li>Redirect to the same view with a new windowId in the URL</li>
+<li>Renders the view</li>
+<li>Stores the windowId as <code>window.name</code> on the client side</li>
+</ul>
+<h5 id="further-get-request-with-windowid">Further GET request with windowID</h5>
+<ul>
+<li>Renders the view</li>
+<li>Checks if the requested windowID matches the <code>window.name</code></li>
+<li>If it does not match, reload the URL with the right windowId taken from <code>window.name</code></li>
+</ul>
+<h5 id="further-get-request-without-windowid">Further GET request without windowID</h5>
+<ul>
+<li>Redirect to the same view with a new windowId in the URL</li>
+<li>Renders the view</li>
+<li>If it does not match, reload the URL with the right windowId taken from <code>window.name</code></li>
+</ul>
+<p>TODO: Contra</p>
 <h3 id="none">NONE</h3>
+<p>Any window or browser tab detection will be disabled for the current request.<br/>
+Scopes like @WindowScoped, @GroupedConversationScoped or @ViewAccessScoped will not work.</p>
 <h3 id="delegated">DELEGATED</h3>
+<p>Delegates the complete window handling to thew new JSF 2.2 ClientWindow (if not
disabled).</p>
 <h3 id="custom">CUSTOM</h3>
+<p>Enables to use an complete own <code>org.apache.deltaspike.jsf.spi.scope.window.ClientWindow</code>
implementation.</p>
 <h2 id="configuration">Configuration</h2>
 <h3 id="dswindowid">ds:windowId</h3>
-<p>The component <code>ds:windowId</code> (<code>xmlns:ds="http://deltaspike.apache.org/jsf"</code>)
is required to enable the full control of the DeltaSpike window handling.
-It will import and render the required script parts for both <code>LAZY</code>
and <code>CLIENTWINDOW</code> mode.
+<p>The component <code>ds:windowId</code> (<code>xmlns:ds="http://deltaspike.apache.org/jsf"</code>)
is required to enable the full control of the DeltaSpike window handling.<br/>
+It will import and render the required script parts for both <code>LAZY</code>
and <code>CLIENTWINDOW</code> mode.<br/>
 The best way, to apply it for all views, is to add this component to all of your templates.</p>
 <h3 id="switch-mode">Switch Mode</h3>
-<p>To switch the mode, you can just provide a DefaultClientWindowConfig or ClientWindowConfig:</p>
+<p>To switch the mode, you can just provide a <code>org.apache.deltaspike.jsf.spi.scope.window.DefaultClientWindowConfig</code>
or <code>org.apache.deltaspike.jsf.spi.scope.window.ClientWindowConfig</code>:</p>
 <div class="codehilite"><pre><span class="nd">@Specializes</span>
 <span class="kd">public</span> <span class="kd">class</span> <span
class="nc">MyClientWindowConfig</span> <span class="kd">extends</span>
<span class="n">DefaultClientWindowConfig</span>
 <span class="o">{</span>
@@ -181,7 +230,7 @@ The best way, to apply it for all views,
 
 
 <h3 id="provide-a-custom-clientwindow">Provide a custom ClientWindow</h3>
-<p>If you would like to provide an custom ClientWindow implementation, you can just
do it e.g. via CDI alternatives:</p>
+<p>If you would like to provide an custom <code>org.apache.deltaspike.jsf.spi.scope.window.ClientWindow</code>
implementation, you can just do it e.g. via CDI alternatives:</p>
 <div class="codehilite"><pre><span class="nd">@ApplicationScoped</span>
 <span class="kd">public</span> <span class="kd">class</span> <span
class="nc">MyClientWindow</span> <span class="kd">implements</span> <span
class="n">ClientWindow</span>
 <span class="o">{</span>
@@ -197,7 +246,7 @@ The best way, to apply it for all views,
     <span class="nd">@Override</span>
     <span class="kd">public</span> <span class="n">ClientWindowRenderMode</span>
<span class="nf">getClientWindowRenderMode</span><span class="o">(</span><span
class="n">FacesContext</span> <span class="n">facesContext</span><span
class="o">)</span>
     <span class="o">{</span>
-        <span class="k">return</span> <span class="n">ClientWindowRenderMode</span><span
class="o">.</span><span class="na">LAZY</span><span class="o">;</span>
+        <span class="k">return</span> <span class="n">ClientWindowRenderMode</span><span
class="o">.</span><span class="na">CUSTOM</span><span class="o">;</span>
     <span class="o">}</span>
 <span class="o">}</span>
 </pre></div>



Mime
View raw message