deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r864998 [9/15] - in /websites/staging/deltaspike/trunk/content: ./ deltaspike/ deltaspike/draft/ deltaspike/resources/ draft/ resources/ resources/css/ resources/files/ resources/images/ resources/js/
Date Sun, 09 Jun 2013 09:26:33 GMT
Added: websites/staging/deltaspike/trunk/content/jsf.html
==============================================================================
--- websites/staging/deltaspike/trunk/content/jsf.html (added)
+++ websites/staging/deltaspike/trunk/content/jsf.html Sun Jun  9 09:26:31 2013
@@ -0,0 +1,780 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <meta name="description" content="deltaspike-generate-pages">
+    <meta name="author" content="chm">
+
+    <title>Apache DeltaSpike - JSF</title>
+
+    
+
+    
+    <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with the License.  You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the specific language governing permissions and limitations under the License. -->
+
+    <!-- Styles -->
+    
+    <link href="./deltaspike/resources/css/bootstrap.css" rel="stylesheet">    
+    <!--<link href="./deltaspike/resources/css/prettify.css" rel="stylesheet" /> -->
+    <link href="./deltaspike/resources/css/codehilite.css" rel="stylesheet" />
+    <link href="./deltaspike/resources/css/bootstrap-responsive.css" rel="stylesheet">
+    <style type="text/css">
+        body {
+            padding-top: 60px;
+            padding-bottom: 40px;
+        }
+    </style>
+	<script type="text/javascript">
+
+	  var _gaq = _gaq || [];
+	  _gaq.push(['_setAccount', 'UA-36103647-1']);
+	  _gaq.push(['_trackPageview']);
+	
+	  (function() {
+		var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+		ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+		var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+	  })();
+	
+	</script>
+</head>
+
+<body>
+
+    <div class="navbar navbar-fixed-top">
+        <div class="navbar-inner">
+            <div class="container">
+                <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+                    <span class="icon-bar"></span>
+                    <span class="icon-bar"></span>
+                    <span class="icon-bar"></span>
+                </a>
+                <a class="brand" href="index.html"><img src="./deltaspike/resources/images/deltaspike-logo-medium.png"/></a>
+                <div class="nav-collapse">
+                    <ul class="nav">
+                        <li class="active"><a href="./deltaspike/index.html">Home</a></li>
+                        <li><a href="./deltaspike/documentation.html">Documentation</a></li>
+                        <li><a href="./deltaspike/source.html">Source</a></li>
+                        <!-- <li><a href="./deltaspike/download.html">Download</a></li> -->
+                        <li><a href="./deltaspike/community.html">Community</a></li>
+                        <!-- <li><a href="./deltaspike/support.html">Support</a></li>  -->
+                        <li><a href="./deltaspike/news.html">News</a></li>
+                        <li><a href="./deltaspike/migration-guide.html">Migration</a></li>
+                    </ul>
+                </div><!--/.nav-collapse -->
+                <form id="search-form" action="http://www.google.com/search" method="get"  class="navbar-search pull-right" >
+                    <input value="incubator.apache.org/deltaspike" name="sitesearch" type="hidden"/>
+                    <input class="search-query" name="q" id="query" type="text" />
+                </form>
+            </div>
+        </div>
+    </div>
+
+    <div class="container">
+      <div class="row">
+          <div class="span12">
+              <div class="page-title">
+                <h1>JSF</h1>
+              </div>
+              <div class="toc">
+<ul>
+<li><a href="#type-safe-view-configs">Type-safe View-Configs</a><ul>
+<li><a href="#intro">Intro</a></li>
+<li><a href="#motivation">Motivation</a></li>
+<li><a href="#basic-api-usages">Basic API usages</a><ul>
+<li><a href="#file-view-and-folder-folder-paths">File (@View) and Folder (@Folder) paths</a><ul>
+<li><a href="#foldername">@Folder#name</a></li>
+<li><a href="#view">@View</a></li>
+</ul>
+</li>
+<li><a href="#navigation-parameters">Navigation Parameters</a><ul>
+<li><a href="#static-configuration-via-navigationparameter">Static Configuration via @NavigationParameter</a></li>
+<li><a href="#dynamic-configuration-via-navigationparametercontext">Dynamic Configuration via NavigationParameterContext</a></li>
+</ul>
+</li>
+<li><a href="#security-integration-via-secured">Security Integration via @Secured</a></li>
+<li><a href="#view-controller-callbacks-via-viewcontrollerref">View-Controller Callbacks via @ViewControllerRef</a></li>
+<li><a href="#referencing-views-via-viewref">Referencing Views via @ViewRef</a></li>
+<li><a href="#using-the-optional-viewnavigationhandler">Using the (optional) ViewNavigationHandler</a></li>
+<li><a href="#configuring-a-default-error-view">Configuring a Default Error-View</a></li>
+<li><a href="#using-matches">Using @Matches</a></li>
+<li><a href="#using-viewconfigresolver">Using ViewConfigResolver</a></li>
+</ul>
+</li>
+<li><a href="#advanced-api-usages">Advanced API usages</a><ul>
+<li><a href="#creating-custom-meta-data-via-viewmetadata">Creating Custom Meta-Data via @ViewMetaData</a></li>
+<li><a href="#creating-custom-callbacks-via-viewmetadata">Creating Custom Callbacks via @ViewMetaData</a></li>
+<li><a href="#creating-custom-inline-meta-data-via-inlineviewmetadata">Creating Custom inline Meta-Data via @InlineViewMetaData</a></li>
+</ul>
+</li>
+<li><a href="#view-config-spi">View-Config SPI</a></li>
+<li><a href="#activation-of-custom-naming-conventions">Activation of custom naming conventions</a></li>
+</ul>
+</li>
+<li><a href="#support-of-ear-deployments">Support of EAR deployments</a></li>
+<li><a href="#hints">Hints</a></li>
+</ul>
+</div>
+<hr />
+<h1 id="type-safe-view-configs">Type-safe View-Configs</h1>
+<h2 id="intro">Intro</h2>
+<p>Type-safe view-configs are static configs which can be used in combination with every view-technology which is based on Java.
+Currently DeltaSpike itself provides an integration for JSF, however, the basic concepts are independent of it.
+(Since DeltaSpike provides the default integration only for JSF, the whole documentation for view-configs is located here.)</p>
+<p>Thanks to features like multiple (meta-data-)inheritance via interfaces, it provides a powerful approach to bind meta-data to one or multiple views.
+In case of the JSF integration it's possible to provide e.g. type-safe meta-data for security, navigation, callbacks for view-controllers.
+Beyond configuring view (/pages) via this concept, it's also possible to use the (view-)config classes for type-safe navigation.
+Since it's std. Java, you can benefit from any Java-IDE and you don't need special IDE-Addons to use it efficiently.</p>
+<p>Even the concepts provided by modules (of DeltaSpike itself) are based on the basic API provided by the Core. So it's possible to introduce custom concepts the same way DeltaSpike itself does.</p>
+<h2 id="motivation">Motivation</h2>
+<p>Instead of learning the concepts and rules of view-configs provided by DeltaSpike, it might be easier for simple demos to just type some simple(r) strings.
+So why should you use something which is slightly more work <strong>initially</strong>?</p>
+<p><strong>The short answer is:</strong></p>
+<p>It gives a good return in case of real applications (esp. beyond simple demos).</p>
+<p><strong>The long answer is:</strong></p>
+<p>You can benefit from it from the first second:</p>
+<ul>
+<li>It's type-safe -&gt;<ul>
+<li>the Java compiler ensures that you don't have typos at the final usages (and the rest can be checked during bootstrapping of the application)</li>
+<li>you can benefit from the auto.complete features of any modern Java IDE.</li>
+</ul>
+</li>
+<li>If you change the name of a file/folder, you need only one (easy) code-change in a single place and your (std. Java-) IDE will do the rest for you (= update all usages) without a special plug-in</li>
+<li>It's possible to restrict the navigation target -&gt; you can ensure that the navigation target is still the intended one (e.g. after a refactoring)</li>
+<li>You can configure meta-data in a central place (which can get inherited via <strong>multiple</strong> inheritance based on Java interfaces)</li>
+<li>Easier for developers to find usages</li>
+<li>Allows easy(er) refactorings and maintenance</li>
+<li>You can use your IDE more efficiently esp. in large projects
+   (there are some users who initially switched to it, because their tools for displaying the config they had before open large config files very slowly...)</li>
+<li>Modern Java IDEs show inheritance of interfaces and classes in a nice way. Since the view-config is based on std. classes and interfaces, you can benefit from it easily.</li>
+</ul>
+<p>Advantages which are planned for later (= currently not supported):</p>
+<ul>
+<li>It's possible to check if the configured folders and files really exist during/after the bootstrapping phase of the application (currently it isn't implemented, but it's possible to do it).</li>
+<li>It's also easy(er) for tools (IDE plugins,...) to validate it</li>
+</ul>
+<p>If you are still not convinced, you just have to try it. You will see how your daily workflow benefits from it pretty soon.</p>
+<h2 id="basic-api-usages">Basic API usages</h2>
+<p>While reading this section keep the following simple rules in mind:
+<ul>
+  <li>Meta-data gets inherited along the path of Java inheritance</li>
+  <li>File-/Folder- paths are build based on nesting classes and interfaces</li>
+</ul></p>
+<p>Usually users don't need to be aware of all descriptors, SPIs,... which are described by this documentation.</p>
+<p>There are a lot of possibilities to configure views and some of them are optional.
+The following examples show some of them in combination with features provided by the JSF- and Security-Module of DeltaSpike.</p>
+<p>The following example shows the minimal syntax for providing a config for a view (/page).</p>
+<div class="codehilite"><pre><span class="kd">public</span> <span class="kd">class</span> <span class="nc">MyPage</span> <span class="kd">implements</span> <span class="n">ViewConfig</span>
+<span class="o">{</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p>Since it's a class (and not an interface) it's autom. recognized as config for a page (and not a folder) and the default settings get applied during bootstrapping.
+In case of JSF you can use it for navigation e.g. via action-methods.</p>
+<div class="codehilite"><pre><span class="kd">public</span> <span class="n">Class</span><span class="o">&lt;?</span> <span class="kd">extends</span> <span class="n">ViewConfig</span><span class="o">&gt;</span> <span class="n">toNextPage</span><span class="o">()</span>
+<span class="o">{</span>
+    <span class="k">return</span> <span class="n">MyPage</span><span class="o">.</span><span class="na">class</span><span class="o">;</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p>This leads to a forward to <code>/myPage.xhtml</code>. Information like base-path, file- (and folder-)name/s, file-extension, navigation mode, view-params,... can be customized with the corresponding (meta-data-)annotations.
+One of those annotations provided by the JSF module (which is optional) is <code>@View</code>. That means the following example leads to the same as the first one.</p>
+<div class="codehilite"><pre><span class="nd">@View</span> <span class="c1">//optional</span>
+<span class="kd">public</span> <span class="kd">class</span> <span class="nc">MyPage</span> <span class="kd">implements</span> <span class="n">ViewConfig</span>
+<span class="o">{</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p>But it's also possible to reflect the folder structure via nesting of interfaces and classes. An example for it is:</p>
+<div class="codehilite"><pre><span class="kd">public</span> <span class="kd">interface</span> <span class="nc">Pages</span>
+<span class="o">{</span>
+    <span class="kd">class</span> <span class="nc">Index</span> <span class="kd">implements</span> <span class="n">ViewConfig</span> <span class="o">{</span> <span class="o">}</span>
+
+    <span class="kd">interface</span> <span class="nc">AdminArea</span> <span class="kd">extends</span> <span class="n">ViewConfig</span>
+    <span class="o">{</span>
+        <span class="kd">class</span> <span class="nc">Index</span> <span class="kd">implements</span> <span class="n">Admin</span> <span class="o">{</span> <span class="o">}</span>
+    <span class="o">}</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p>In case of the JSF integration it leads to the following view-ids:<br/>
+/pages/index.xhtml<br/>
+/pages/adminArea/index.xhtml<br/></p>
+<p>Like the optional <code>@View</code> for pages represented by the classes, it's possible to use the optional <code>@Folder</code> annotation for directories represented by the (nested) interfaces.</p>
+<p>Furthermore, it's possible to inherit meta-data along with the normal inheritance.</p>
+<p>In the following example <code>Pages.Admin.Index</code>, <code>Pages.Admin.Home</code> and <code>Pages.Admin.Statistics.Home</code> inherit the meta-data from <code>Pages.Admin</code> because they implement the interface whereas <code>Pages.Admin.Statistics.Index</code> doesn't. However, <code>Pages.Admin.Home</code> overrides <code>View#navigation</code>. During the bootstrapping process the meta-data gets merged and at runtime you only see the final result (which is cached).</p>
+<div class="codehilite"><pre><span class="kd">public</span> <span class="kd">interface</span> <span class="nc">Pages</span>
+<span class="o">{</span>
+    <span class="nd">@View</span><span class="o">(</span><span class="n">name</span> <span class="o">=</span> <span class="s">&quot;home&quot;</span><span class="o">,</span> <span class="n">extension</span> <span class="o">=</span> <span class="n">JSP</span><span class="o">)</span>
+    <span class="kd">class</span> <span class="nc">Index</span> <span class="kd">implements</span> <span class="n">ViewConfig</span> <span class="o">{</span> <span class="o">}</span>
+
+    <span class="nd">@View</span><span class="o">(</span><span class="n">navigation</span> <span class="o">=</span> <span class="n">REDIRECT</span><span class="o">,</span> <span class="n">viewParams</span> <span class="o">=</span> <span class="n">INCLUDE</span><span class="o">)</span>
+    <span class="kd">interface</span> <span class="nc">Admin</span> <span class="kd">extends</span> <span class="n">ViewConfig</span>
+    <span class="o">{</span>
+        <span class="kd">interface</span> <span class="nc">Statistics</span>
+        <span class="o">{</span>
+            <span class="nd">@View</span> <span class="c1">//optional</span>
+            <span class="kd">class</span> <span class="nc">Index</span> <span class="kd">implements</span> <span class="n">ViewConfig</span> <span class="o">{</span> <span class="o">}</span>
+
+            <span class="kd">class</span> <span class="nc">Home</span> <span class="kd">implements</span> <span class="n">Admin</span> <span class="o">{</span> <span class="o">}</span>
+        <span class="o">}</span>
+
+        <span class="kd">class</span> <span class="nc">Index</span> <span class="kd">implements</span> <span class="n">Admin</span> <span class="o">{</span> <span class="o">}</span>
+
+        <span class="nd">@View</span><span class="o">(</span><span class="n">navigation</span> <span class="o">=</span> <span class="n">FORWARD</span><span class="o">)</span>
+        <span class="kd">class</span> <span class="nc">Home</span> <span class="kd">implements</span> <span class="n">Admin</span> <span class="o">{</span> <span class="o">}</span>
+    <span class="o">}</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p>In this case <code>Pages.Admin.Statistics</code> is just an interface to reflect the folder structure. For sure it's also possible that it extends an existing view-config interface and other folders and/or pages inherit its meta-data (like <code>Pages.Admin</code>).</p>
+<p>Furthermore, inheritance can be used to ensure navigation to the correct area in the application. In the following example the return type of the action-method (and therefore the compiler of Java) ensures that the navigation target of this method is within the admin-area.</p>
+<div class="codehilite"><pre><span class="kd">public</span> <span class="n">Class</span><span class="o">&lt;?</span> <span class="kd">extends</span> <span class="n">Pages</span><span class="o">.</span><span class="na">Admin</span><span class="o">&gt;</span> <span class="n">toNextPage</span><span class="o">()</span>
+<span class="o">{</span>
+    <span class="k">return</span> <span class="n">Pages</span><span class="o">.</span><span class="na">Admin</span><span class="o">.</span><span class="na">Index</span><span class="o">.</span><span class="na">class</span><span class="o">;</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<h3 id="file-view-and-folder-folder-paths">File (@View) and Folder (@Folder) paths</h3>
+<p><code>@View</code> as well as <code>@Folder</code> are optional annotations.
+<code>@Folder</code> is only needed for using a different folder-name or for marking folder configs if they don't inherit from <code>org.apache.deltaspike.core.api.config.view.ViewConfig</code> <strong>nor</strong> have a view-config for a page nested into them (like Pages.Wizard1.Step1).
+If it isn't used explicitly, it gets added automatically (so you can query the meta-data at runtime even in cases you haven't placed the annotations explicitly).
+<code>@View</code> allows to customize a bit more and it also gets added automatically if it isn't used explicitly.
+Whereas <code>@Folder</code> gets added to all nested interfaces (above a view-config class - like Pages and Pages.Wizard1), <code>@View</code> only gets added to classes which in-/directly inherit from <code>org.apache.deltaspike.core.api.config.view.ViewConfig</code> (like Pages.Wizard1.Step1).</p>
+<p>That means at runtime the following two configs lead to the same.</p>
+<div class="codehilite"><pre><span class="kd">public</span> <span class="kd">interface</span> <span class="nc">Pages</span>
+<span class="o">{</span>
+    <span class="kd">interface</span> <span class="nc">Wizard1</span>
+    <span class="o">{</span>
+        <span class="kd">class</span> <span class="nc">Step1</span> <span class="kd">implements</span> <span class="n">ViewConfig</span> <span class="o">{</span> <span class="o">}</span>
+    <span class="o">}</span>
+<span class="o">}</span>
+
+<span class="c1">//leads to the same as</span>
+
+<span class="nd">@Folder</span>
+<span class="kd">public</span> <span class="kd">interface</span> <span class="nc">Pages</span>
+<span class="o">{</span>
+    <span class="nd">@Folder</span>
+    <span class="kd">interface</span> <span class="nc">Wizard1</span>
+    <span class="o">{</span>
+        <span class="nd">@View</span>
+        <span class="kd">class</span> <span class="nc">Step1</span> <span class="kd">implements</span> <span class="n">ViewConfig</span> <span class="o">{</span> <span class="o">}</span>
+    <span class="o">}</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p>The example above leads to the following paths:</p>
+<ul>
+<li>/pages/</li>
+<li>/pages/wizard1</li>
+<li>/pages/wizard1/step1.xhtml</li>
+</ul>
+<p>To customize it you can use <code>@Folder#name</code>, <code>@View#basePath</code>, <code>@View#name</code> and <code>@View#extension</code> (or you register custom <code>NameBuilder</code>s inline or globally).</p>
+<h4 id="foldername">@Folder#name</h4>
+<p>The rules are pretty simple. You will get what you write. There are only two additional features:</p>
+<ul>
+<li>You don't have to care about duplicated '/' (e.g. /folder1//folder2/step1.xhtml would get corrected auto. to /folder1/folder2/step1.xhtml)</li>
+<li>With "." at the beginning (e.g. "./") you can keep the path before.</li>
+</ul>
+<p>The following example</p>
+<div class="codehilite"><pre><span class="kd">interface</span> <span class="nc">Pages</span>
+<span class="o">{</span>
+    <span class="nd">@Folder</span><span class="o">(</span><span class="n">name</span> <span class="o">=</span> <span class="s">&quot;/w1/&quot;</span><span class="o">)</span>
+    <span class="kd">interface</span> <span class="nc">Wizard1</span>
+    <span class="o">{</span>
+        <span class="kd">class</span> <span class="nc">Step1</span> <span class="kd">implements</span> <span class="n">ViewConfig</span> <span class="o">{</span> <span class="o">}</span>
+    <span class="o">}</span>
+
+    <span class="nd">@Folder</span><span class="o">(</span><span class="n">name</span> <span class="o">=</span> <span class="s">&quot;./w2/&quot;</span><span class="o">)</span>
+    <span class="kd">interface</span> <span class="nc">Wizard2</span> <span class="kd">extends</span> <span class="n">ViewConfig</span>
+    <span class="o">{</span>
+        <span class="kd">class</span> <span class="nc">Step1</span> <span class="kd">implements</span> <span class="n">Wizard2</span> <span class="o">{</span> <span class="o">}</span>   <span class="c1">//ViewConfig is inherited indirectly</span>
+    <span class="o">}</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p>leads to the following paths:</p>
+<ul>
+<li>/pages/</li>
+<li>/w1/</li>
+<li>/w1/step1.xhtml</li>
+<li>/pages/w2/step1.xhtml</li>
+</ul>
+<h4 id="view">@View</h4>
+<p>The same naming rules apply to <code>@View#basePath</code>. However, it's only valid to be used at view-config nodes which represent pages (-&gt; classes and not interfaces).
+On interfaces always use <code>@Folder</code> (<code>@View#basePath</code> will get ignored there).</p>
+<div class="codehilite"><pre><span class="kd">interface</span> <span class="nc">Pages</span>
+<span class="o">{</span>
+    <span class="kd">interface</span> <span class="nc">Wizard1</span>
+    <span class="o">{</span>
+        <span class="nd">@View</span> <span class="c1">//optional</span>
+        <span class="kd">class</span> <span class="nc">Step1</span> <span class="kd">implements</span> <span class="n">ViewConfig</span> <span class="o">{</span> <span class="o">}</span>
+
+        <span class="nd">@View</span><span class="o">(</span><span class="n">basePath</span> <span class="o">=</span> <span class="s">&quot;/&quot;</span><span class="o">)</span>
+        <span class="kd">class</span> <span class="nc">Step2</span> <span class="kd">implements</span> <span class="n">ViewConfig</span> <span class="o">{</span> <span class="o">}</span>
+
+        <span class="nd">@View</span><span class="o">(</span><span class="n">basePath</span> <span class="o">=</span> <span class="s">&quot;./&quot;</span><span class="o">)</span> <span class="c1">//or just &quot;.&quot;</span>
+        <span class="kd">class</span> <span class="nc">Step3</span> <span class="kd">implements</span> <span class="n">ViewConfig</span> <span class="o">{</span> <span class="o">}</span>
+
+        <span class="nd">@View</span><span class="o">(</span><span class="n">basePath</span> <span class="o">=</span> <span class="s">&quot;/w1/&quot;</span><span class="o">)</span>
+        <span class="kd">class</span> <span class="nc">Step4</span> <span class="kd">implements</span> <span class="n">ViewConfig</span> <span class="o">{</span> <span class="o">}</span>
+
+        <span class="nd">@View</span><span class="o">(</span><span class="n">basePath</span> <span class="o">=</span> <span class="s">&quot;./w1/&quot;</span><span class="o">)</span>
+        <span class="kd">class</span> <span class="nc">Step5</span> <span class="kd">implements</span> <span class="n">ViewConfig</span> <span class="o">{</span> <span class="o">}</span>
+    <span class="o">}</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p>leads to the following paths:</p>
+<ul>
+<li>/pages</li>
+<li>/pages/wizard1/</li>
+<li>/pages/wizard1/step1.xhtml</li>
+<li>/step2.xhtml</li>
+<li>/pages/wizard1/step3.xhtml</li>
+<li>/w1/step4.xhtml</li>
+<li>/pages/wizard/w1/step5.xhtml</li>
+</ul>
+<p>and depending on additional meta-data you would like to inherit (e.g. <code>@View(navigation = REDIRECT)</code>), you can also use:</p>
+<div class="codehilite"><pre><span class="nd">@View</span><span class="o">(</span><span class="n">navigation</span> <span class="o">=</span> <span class="n">REDIRECT</span><span class="o">)</span>
+<span class="kd">interface</span> <span class="nc">Pages</span> <span class="kd">extends</span> <span class="n">ViewConfig</span> 
+<span class="o">{</span>
+    <span class="kd">interface</span> <span class="nc">Wizard1</span> <span class="kd">extends</span> <span class="n">Pages</span>
+    <span class="o">{</span>
+        <span class="nd">@View</span>
+        <span class="kd">class</span> <span class="nc">Step1</span> <span class="kd">implements</span> <span class="n">Wizard1</span> <span class="o">{</span> <span class="o">}</span>
+
+        <span class="nd">@View</span><span class="o">(</span><span class="n">basePath</span> <span class="o">=</span> <span class="s">&quot;/&quot;</span><span class="o">)</span>
+        <span class="kd">class</span> <span class="nc">Step2</span> <span class="kd">implements</span> <span class="n">Wizard1</span> <span class="o">{</span> <span class="o">}</span>
+
+        <span class="nd">@View</span><span class="o">(</span><span class="n">basePath</span> <span class="o">=</span> <span class="s">&quot;./&quot;</span><span class="o">)</span>
+        <span class="kd">class</span> <span class="nc">Step3</span> <span class="kd">implements</span> <span class="n">Wizard1</span> <span class="o">{</span> <span class="o">}</span>
+
+        <span class="nd">@View</span><span class="o">(</span><span class="n">basePath</span> <span class="o">=</span> <span class="s">&quot;/w1/&quot;</span><span class="o">)</span>
+        <span class="kd">class</span> <span class="nc">Step4</span> <span class="kd">implements</span> <span class="n">Wizard1</span> <span class="o">{</span> <span class="o">}</span>
+
+        <span class="nd">@View</span><span class="o">(</span><span class="n">basePath</span> <span class="o">=</span> <span class="s">&quot;./w1/&quot;</span><span class="o">)</span>
+        <span class="kd">class</span> <span class="nc">Step5</span> <span class="kd">implements</span> <span class="n">Wizard1</span> <span class="o">{</span> <span class="o">}</span>
+    <span class="o">}</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p>It leads to the same paths, but in addition <code>@View#navigation</code> gets inherited along the inheritance path.</p>
+<h3 id="navigation-parameters">Navigation Parameters</h3>
+<p>Since the view-config is static, an approach to add parameters is needed. The following part shows different possibilities to add parameters which end up in the final URL after '?' (in case of the integration with JSF).
+It isn't needed to add all (types of) parameters that way. Some get added autom. based on special meta-data (e.g. <code>@View#navigation</code> and <code>@View#viewParams</code>). Instead of adding <code>"faces-redirect=true"</code> manually it's done for you as soon as you are using <code>@View(navigation = REDIRECT)</code>. The same goes for <code>"includeViewParams=true"</code> and <code>@View(viewParams = INCLUDE)</code>.</p>
+<h4 id="static-configuration-via-navigationparameter">Static Configuration via @NavigationParameter</h4>
+<p>In some cases it's needed to add an information in any case. So you can annotate the view-config class with <code>@NavigationParameter</code>. Supported values are static strings or EL-expressions.</p>
+<div class="codehilite"><pre><span class="kd">public</span> <span class="kd">interface</span> <span class="nc">Pages</span> <span class="kd">extends</span> <span class="n">ViewConfig</span>
+<span class="o">{</span>
+    <span class="nd">@NavigationParameter</span><span class="o">(</span><span class="n">key</span> <span class="o">=</span> <span class="s">&quot;param1&quot;</span><span class="o">,</span> <span class="n">value</span> <span class="o">=</span> <span class="s">&quot;staticValue1&quot;</span><span class="o">)</span>
+    <span class="kd">class</span> <span class="nc">Index</span> <span class="kd">implements</span> <span class="n">Pages</span> <span class="o">{</span> <span class="o">}</span>
+
+    <span class="nd">@NavigationParameter.List</span><span class="o">({</span>
+        <span class="nd">@NavigationParameter</span><span class="o">(</span><span class="n">key</span> <span class="o">=</span> <span class="s">&quot;param1&quot;</span><span class="o">,</span> <span class="n">value</span> <span class="o">=</span> <span class="s">&quot;staticValue1&quot;</span><span class="o">),</span>
+        <span class="nd">@NavigationParameter</span><span class="o">(</span><span class="n">key</span> <span class="o">=</span> <span class="s">&quot;param2&quot;</span><span class="o">,</span> <span class="n">value</span> <span class="o">=</span> <span class="s">&quot;#{myBean.property1}&quot;</span><span class="o">)</span>
+    <span class="o">})</span>
+    <span class="kd">class</span> <span class="nc">Overview</span> <span class="kd">implements</span> <span class="n">Pages</span> <span class="o">{</span> <span class="o">}</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p>Instead of using parameters in any case, it's also possible to configure them statically for particular methods:</p>
+<div class="codehilite"><pre><span class="nd">@Model</span>
+<span class="kd">public</span> <span class="kd">class</span> <span class="nc">PageBean</span>
+<span class="o">{</span>
+    <span class="nd">@NavigationParameter</span><span class="o">(</span><span class="n">key</span> <span class="o">=</span> <span class="s">&quot;param2&quot;</span><span class="o">,</span> <span class="n">value</span> <span class="o">=</span> <span class="s">&quot;#{myBean.property1}&quot;</span><span class="o">)</span>
+    <span class="kd">public</span> <span class="n">Class</span><span class="o">&lt;?</span> <span class="kd">extends</span> <span class="n">ViewConfig</span><span class="o">&gt;</span> <span class="n">actionMethod1</span><span class="o">()</span>
+    <span class="o">{</span>
+        <span class="k">return</span> <span class="n">SimplePageConfig</span><span class="o">.</span><span class="na">class</span><span class="o">;</span>
+    <span class="o">}</span>
+
+    <span class="nd">@NavigationParameter.List</span><span class="o">({</span>
+        <span class="nd">@NavigationParameter</span><span class="o">(</span><span class="n">key</span> <span class="o">=</span> <span class="s">&quot;param1&quot;</span><span class="o">,</span> <span class="n">value</span> <span class="o">=</span> <span class="s">&quot;staticValue1&quot;</span><span class="o">),</span>
+        <span class="nd">@NavigationParameter</span><span class="o">(</span><span class="n">key</span> <span class="o">=</span> <span class="s">&quot;param2&quot;</span><span class="o">,</span> <span class="n">value</span> <span class="o">=</span> <span class="s">&quot;staticValue2&quot;</span><span class="o">)</span>
+    <span class="o">})</span>
+    <span class="kd">public</span> <span class="n">Class</span><span class="o">&lt;?</span> <span class="kd">extends</span> <span class="n">ViewConfig</span><span class="o">&gt;</span> <span class="n">actionMethod2</span><span class="o">()</span>
+    <span class="o">{</span>
+        <span class="k">return</span> <span class="n">SimplePageConfig</span><span class="o">.</span><span class="na">class</span><span class="o">;</span>
+    <span class="o">}</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<h4 id="dynamic-configuration-via-navigationparametercontext">Dynamic Configuration via NavigationParameterContext</h4>
+<p>Instead of using parameters in a static fashion (as shown above), it's also possible to add them dynamically (e.g. in case of special conditions).</p>
+<div class="codehilite"><pre><span class="nd">@Named</span>
+<span class="nd">@SessionScoped</span>
+<span class="kd">public</span> <span class="kd">class</span> <span class="nc">PageBean</span>
+<span class="o">{</span>
+    <span class="kd">private</span> <span class="kt">int</span> <span class="n">currentValue</span> <span class="o">=</span> <span class="o">-</span><span class="mi">10</span><span class="o">;</span>
+
+    <span class="nd">@Inject</span>
+    <span class="kd">private</span> <span class="n">NavigationParameterContext</span> <span class="n">navigationParameterContext</span><span class="o">;</span>
+
+    <span class="kd">public</span> <span class="n">Class</span><span class="o">&lt;?</span> <span class="kd">extends</span> <span class="n">ViewConfig</span><span class="o">&gt;</span> <span class="n">actionMethod</span><span class="o">()</span>
+    <span class="o">{</span>
+        <span class="n">currentValue</span><span class="o">++;</span>
+
+        <span class="k">if</span> <span class="o">(</span><span class="n">currentValue</span> <span class="o">&gt;=</span> <span class="mi">0</span><span class="o">)</span>
+        <span class="o">{</span>
+            <span class="k">this</span><span class="o">.</span><span class="na">navigationParameterContext</span><span class="o">.</span><span class="na">addPageParameter</span><span class="o">(</span><span class="s">&quot;cv&quot;</span><span class="o">,</span> <span class="k">this</span><span class="o">.</span><span class="na">currentValue</span><span class="o">);</span>
+        <span class="o">}</span>
+        <span class="k">return</span> <span class="n">SimplePageConfig</span><span class="o">.</span><span class="na">class</span><span class="o">;</span>
+    <span class="o">}</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<h3 id="security-integration-via-secured">Security Integration via @Secured</h3>
+<p>This annotation is a custom view-meta-data provided by the Security-module which allows to integrate 3rd party frameworks (or custom approaches) to secure pages as well as whole folders.
+You can annotate specific parts or a marker-interface. <code>CustomAccessDecisionVoter</code> used in the following example can be any implementation of <code>org.apache.deltaspike.security.api.authorization.AccessDecisionVoter</code> and needs to be a std. CDI bean which means you can use dependecy-injection to trigger any kind of security check.
+All parts which inherit from <code>SecuredPages</code> (<code>Pages.Admin</code>, <code>Pages.Admin.Index</code> and <code>Pages.Admin.Home</code>) are protected by <code>CustomAccessDecisionVoter</code>.<br/></p>
+<p>(It's easy to check this hierarchy in a modern Java-IDE. Only for displaying the final meta-data for every node in the IDE a special plug-in would be needed.)</p>
+<div class="codehilite"><pre><span class="nd">@Secured</span><span class="o">(</span><span class="n">CustomAccessDecisionVoter</span><span class="o">.</span><span class="na">class</span><span class="o">)</span>
+<span class="kd">public</span> <span class="kd">interface</span> <span class="nc">SecuredPages</span> <span class="o">{}</span>
+
+<span class="nd">@View</span><span class="o">(</span><span class="n">navigation</span> <span class="o">=</span> <span class="n">REDIRECT</span><span class="o">)</span>
+<span class="kd">public</span> <span class="kd">interface</span> <span class="nc">Pages</span> <span class="kd">extends</span> <span class="n">ViewConfig</span>
+<span class="o">{</span>
+    <span class="kd">class</span> <span class="nc">Index</span> <span class="kd">implements</span> <span class="n">Pages</span> <span class="o">{</span> <span class="o">}</span>
+
+    <span class="kd">interface</span> <span class="nc">Admin</span> <span class="kd">extends</span> <span class="n">Pages</span><span class="o">,</span> <span class="n">SecuredPages</span>
+    <span class="o">{</span>
+        <span class="kd">class</span> <span class="nc">Index</span> <span class="kd">implements</span> <span class="n">Admin</span> <span class="o">{</span> <span class="o">}</span>
+
+        <span class="nd">@View</span><span class="o">(</span><span class="n">navigation</span> <span class="o">=</span> <span class="n">FORWARD</span><span class="o">)</span>
+        <span class="kd">class</span> <span class="nc">Home</span> <span class="kd">implements</span> <span class="n">Admin</span> <span class="o">{</span> <span class="o">}</span>
+    <span class="o">}</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p>For sure it's also possible to use it without a special interface. In this case you would need:</p>
+<div class="codehilite"><pre><span class="nd">@View</span><span class="o">(</span><span class="n">navigation</span> <span class="o">=</span> <span class="n">REDIRECT</span><span class="o">)</span>
+<span class="kd">public</span> <span class="kd">interface</span> <span class="nc">Pages</span> <span class="kd">extends</span> <span class="n">ViewConfig</span>
+<span class="o">{</span>
+    <span class="kd">class</span> <span class="nc">Index</span> <span class="kd">implements</span> <span class="n">Pages</span> <span class="o">{</span> <span class="o">}</span>
+
+    <span class="nd">@Secured</span><span class="o">(</span><span class="n">CustomAccessDecisionVoter</span><span class="o">.</span><span class="na">class</span><span class="o">)</span>
+    <span class="kd">interface</span> <span class="nc">Admin</span> <span class="kd">extends</span> <span class="n">Pages</span>
+    <span class="o">{</span>
+        <span class="kd">class</span> <span class="nc">Index</span> <span class="kd">implements</span> <span class="n">Admin</span> <span class="o">{</span> <span class="o">}</span>
+
+        <span class="nd">@View</span><span class="o">(</span><span class="n">navigation</span> <span class="o">=</span> <span class="n">FORWARD</span><span class="o">)</span>
+        <span class="kd">class</span> <span class="nc">Home</span> <span class="kd">implements</span> <span class="n">Admin</span> <span class="o">{</span> <span class="o">}</span>
+    <span class="o">}</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p>or</p>
+<div class="codehilite"><pre><span class="p">@</span><span class="n">View</span><span class="p">(</span><span class="n">navigation</span> <span class="p">=</span> <span class="n">REDIRECT</span><span class="p">)</span>
+<span class="n">public</span> <span class="n">interface</span> <span class="n">Pages</span> <span class="n">extends</span> <span class="n">ViewConfig</span>
+<span class="p">{</span>
+    <span class="n">class</span> <span class="n">Index</span> <span class="n">implements</span> <span class="n">Pages</span> <span class="p">{</span> <span class="p">}</span>
+
+    <span class="n">interface</span> <span class="n">Admin</span> <span class="n">extends</span> <span class="n">Pages</span>
+    <span class="p">{</span>
+        <span class="p">@</span><span class="n">Secured</span><span class="p">(</span><span class="n">CustomAccessDecisionVoter</span><span class="p">.</span><span class="n">class</span><span class="p">)</span>
+        <span class="n">class</span> <span class="n">Index</span> <span class="n">implements</span> <span class="n">Admin</span> <span class="p">{</span> <span class="p">}</span>
+
+        <span class="p">@</span><span class="n">Secured</span><span class="p">(</span><span class="n">CustomAccessDecisionVoter</span><span class="p">.</span><span class="n">class</span><span class="p">)</span>
+        <span class="p">@</span><span class="n">View</span><span class="p">(</span><span class="n">navigation</span> <span class="p">=</span> <span class="n">FORWARD</span><span class="p">)</span>
+        <span class="n">class</span> <span class="n">Home</span> <span class="n">implements</span> <span class="n">Admin</span> <span class="p">{</span> <span class="p">}</span>
+    <span class="p">}</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<h3 id="view-controller-callbacks-via-viewcontrollerref">View-Controller Callbacks via @ViewControllerRef</h3>
+<p>This annotation is a custom view-meta-data provided by the JSF-module which allows to configure beans which should act as view-controllers. That means they can use view-controller callbacks like <code>@InitView</code>, <code>@PreViewAction</code>, <code>@PreRenderView</code> and <code>@PostRenderView</code>. The following example shows the usage of <code>@PreRenderView</code>.</p>
+<div class="codehilite"><pre><span class="c1">//@View //optional</span>
+<span class="nd">@ViewControllerRef</span><span class="o">(</span><span class="n">MyPageController</span><span class="o">.</span><span class="na">class</span><span class="o">)</span>
+<span class="kd">public</span> <span class="kd">class</span> <span class="nc">MyPage</span> <span class="kd">implements</span> <span class="n">ViewConfig</span>
+<span class="o">{</span>
+<span class="o">}</span>
+
+<span class="nd">@Model</span>
+<span class="kd">public</span> <span class="kd">class</span> <span class="nc">MyPageController</span>
+<span class="o">{</span>
+    <span class="nd">@PreRenderView</span>
+    <span class="kd">protected</span> <span class="kt">void</span> <span class="nf">load</span><span class="o">()</span>
+    <span class="o">{</span>
+        <span class="c1">//...</span>
+    <span class="o">}</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<h3 id="referencing-views-via-viewref">Referencing Views via @ViewRef</h3>
+<p>With <code>@ViewControllerRef#value</code> you can annotate a view-config class to bind (/reference) a controller to it. <code>@ViewRef#config</code> allows the same in the other direction.
+Use an existing view-config to reference one or many view/s.</p>
+<p>That means e.g.</p>
+<div class="codehilite"><pre><span class="kd">public</span> <span class="kd">interface</span> <span class="nc">Pages</span> <span class="kd">extends</span> <span class="n">ViewConfig</span>
+<span class="o">{</span>
+    <span class="kd">class</span> <span class="nc">Index</span> <span class="kd">implements</span> <span class="n">Pages</span> <span class="o">{</span> <span class="o">}</span>
+<span class="o">}</span>
+
+<span class="nd">@ViewRef</span><span class="o">(</span><span class="n">Pages</span><span class="o">.</span><span class="na">Index</span><span class="o">.</span><span class="na">class</span><span class="o">)</span>
+<span class="c1">//...</span>
+<span class="kd">public</span> <span class="kd">class</span> <span class="nc">IndexController</span> <span class="kd">implements</span> <span class="n">Serializable</span>
+<span class="o">{</span>
+    <span class="nd">@PreRenderView</span>
+    <span class="kd">protected</span> <span class="kt">void</span> <span class="nf">preRenderView</span><span class="o">()</span>
+    <span class="o">{</span>
+        <span class="c1">//...</span>
+    <span class="o">}</span>
+
+    <span class="c1">//...</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p>leads to the invocation of the pre-render-view logic before /pages/page1.xhtml gets rendered (and
+it won't be called for other pages).</p>
+<h3 id="using-the-optional-viewnavigationhandler">Using the (optional) ViewNavigationHandler</h3>
+<p>With JSF you typically navigate with the action-method bound to a command-component.
+However, also JSF supports manual navigation via <code>javax.faces.application.NavigationHandler</code>.
+With <code>ViewNavigationHandler</code> DeltaSpike provides an equivalent optimized for type-safe view-configs which is easier to use (and can be used also for other (supported) view technology).</p>
+<p>A simple example is:</p>
+<div class="codehilite"><pre><span class="kd">public</span> <span class="kd">interface</span> <span class="nc">Pages</span> <span class="o">{</span>
+    <span class="kd">class</span> <span class="nc">Index</span> <span class="kd">implements</span> <span class="n">ViewConfig</span> <span class="o">{</span> <span class="o">}</span>
+<span class="o">}</span>
+
+<span class="nd">@Model</span>
+<span class="kd">public</span> <span class="kd">class</span> <span class="nc">AnyController</span>
+<span class="o">{</span>
+    <span class="nd">@Inject</span>
+    <span class="kd">private</span> <span class="n">ViewNavigationHandler</span> <span class="n">viewNavigationHandler</span><span class="o">;</span>
+
+    <span class="kd">public</span> <span class="kt">void</span> <span class="nf">anyMethod</span><span class="o">()</span>
+    <span class="o">{</span>
+        <span class="c1">//navigates to /pages/index.xhtml</span>
+        <span class="k">this</span><span class="o">.</span><span class="na">viewNavigationHandler</span><span class="o">.</span><span class="na">navigateTo</span><span class="o">(</span><span class="n">Pages</span><span class="o">.</span><span class="na">Index</span><span class="o">.</span><span class="na">class</span><span class="o">);</span>
+    <span class="o">}</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p>Also in this case (optional) meta-data will be used for the navigation process, since <code>ViewNavigationHandler</code> just delegates to the active navigation-handler (of JSF).</p>
+<h3 id="configuring-a-default-error-view">Configuring a Default Error-View</h3>
+<p>It's possible to mark one view-config class as default error-view. That means in case of errors it will be used as navigation target automatically.
+Furthermore, it's also possible to use it in your code instead of hardcoding your error-view across the whole application.</p>
+<p>In case of</p>
+<div class="codehilite"><pre><span class="kd">public</span> <span class="kd">interface</span> <span class="nc">Pages</span> <span class="o">{</span>
+    <span class="kd">class</span> <span class="nc">Index</span> <span class="kd">implements</span> <span class="n">ViewConfig</span> <span class="o">{</span> <span class="o">}</span>
+
+    <span class="kd">class</span> <span class="nc">CustomErrorPage</span> <span class="kd">extends</span> <span class="n">DefaultErrorView</span> <span class="o">{</span> <span class="o">}</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p>it's possible to navigate with <code>DefaultErrorView.class</code> instead of hardcoding it to <code>Pages.CustomErrorPage.class</code>.</p>
+<div class="codehilite"><pre><span class="nd">@Model</span>
+<span class="kd">public</span> <span class="kd">class</span> <span class="nc">PageController</span>
+<span class="o">{</span>
+    <span class="kd">public</span> <span class="n">Class</span><span class="o">&lt;?</span> <span class="kd">extends</span> <span class="n">ViewConfig</span><span class="o">&gt;</span> <span class="n">actionWithoutError</span><span class="o">()</span>
+    <span class="o">{</span>
+        <span class="k">return</span> <span class="n">Pages</span><span class="o">.</span><span class="na">Index</span><span class="o">.</span><span class="na">class</span><span class="o">;</span>
+    <span class="o">}</span>
+
+    <span class="kd">public</span> <span class="n">Class</span><span class="o">&lt;?</span> <span class="kd">extends</span> <span class="n">ViewConfig</span><span class="o">&gt;</span> <span class="n">actionWithError</span><span class="o">()</span>
+    <span class="o">{</span>
+        <span class="c1">//navigates to the view which is configured as default error-view</span>
+        <span class="k">return</span> <span class="n">DefaultErrorView</span><span class="o">.</span><span class="na">class</span><span class="o">;</span>
+    <span class="o">}</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p>If you are outside of an action-method you can also use it in combination with <code>ViewNavigationHandler</code>.</p>
+<div class="codehilite"><pre><span class="nd">@Model</span>
+<span class="kd">public</span> <span class="kd">class</span> <span class="nc">AnyController</span>
+<span class="o">{</span>
+    <span class="nd">@Inject</span>
+    <span class="kd">private</span> <span class="n">ViewNavigationHandler</span> <span class="n">viewNavigationHandler</span><span class="o">;</span>
+
+    <span class="kd">public</span> <span class="kt">void</span> <span class="nf">anyMethod</span><span class="o">()</span>
+    <span class="o">{</span>
+        <span class="c1">//navigates to the view which is configured as default error-view</span>
+        <span class="k">this</span><span class="o">.</span><span class="na">viewNavigationHandler</span><span class="o">.</span><span class="na">navigateTo</span><span class="o">(</span><span class="n">DefaultErrorView</span><span class="o">.</span><span class="na">class</span><span class="o">);</span>
+    <span class="o">}</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p>However, in case of JSF you have to ensure that you are at a valid point in the JSF request-lifecycle for a navigation, because invocation gets transformed to a std. (implicit) JSF navigation.</p>
+<h3 id="using-matches">Using @Matches</h3>
+<p>This annotation is currently not integrated.
+[TODO]</p>
+<h3 id="using-viewconfigresolver">Using ViewConfigResolver</h3>
+<p>If you would like to query view-meta-data yourself (for whatever reason), you can do that with <code>ViewConfigResolver</code>.</p>
+<div class="codehilite"><pre><span class="nd">@RequestScoped</span>
+<span class="kd">public</span> <span class="kd">class</span> <span class="nc">ApiDemoBean</span>
+<span class="o">{</span>
+    <span class="nd">@Inject</span>
+    <span class="kd">private</span> <span class="n">ViewConfigResolver</span> <span class="n">viewConfigResolver</span><span class="o">;</span>
+
+    <span class="kd">public</span> <span class="n">String</span> <span class="nf">getViewId</span><span class="o">(</span><span class="n">Class</span><span class="o">&lt;?</span> <span class="kd">extends</span> <span class="n">ViewConfig</span><span class="o">&gt;</span> <span class="n">viewConfigClass</span><span class="o">)</span>
+    <span class="o">{</span>
+        <span class="k">return</span> <span class="n">viewConfigResolver</span><span class="o">.</span><span class="na">getViewConfigDescriptor</span><span class="o">(</span><span class="n">viewConfigClass</span><span class="o">).</span><span class="na">getViewId</span><span class="o">();</span> <span class="c1">//or #getPath</span>
+    <span class="o">}</span>
+
+    <span class="kd">public</span> <span class="n">String</span> <span class="nf">getPath</span><span class="o">(</span><span class="n">Class</span> <span class="n">pathConfigClass</span><span class="o">)</span>
+    <span class="o">{</span>
+        <span class="k">return</span> <span class="n">viewConfigResolver</span><span class="o">.</span><span class="na">getConfigDescriptor</span><span class="o">(</span><span class="n">pathConfigClass</span><span class="o">).</span><span class="na">getPath</span><span class="o">();</span>
+    <span class="o">}</span>
+
+    <span class="kd">public</span> <span class="n">List</span><span class="o">&lt;</span><span class="n">ConfigDescriptor</span><span class="o">&lt;?&gt;&gt;</span> <span class="n">getAllFolderDescriptors</span><span class="o">()</span>
+    <span class="o">{</span>
+        <span class="k">return</span> <span class="n">viewConfigResolver</span><span class="o">.</span><span class="na">getConfigDescriptors</span><span class="o">();</span>
+    <span class="o">}</span>
+
+    <span class="kd">public</span> <span class="n">List</span><span class="o">&lt;</span><span class="n">ViewConfigDescriptor</span><span class="o">&gt;</span> <span class="n">getAllPageDescriptors</span><span class="o">()</span>
+    <span class="o">{</span>
+        <span class="k">return</span> <span class="n">viewConfigResolver</span><span class="o">.</span><span class="na">getViewConfigDescriptors</span><span class="o">();</span>
+    <span class="o">}</span>
+
+    <span class="kd">public</span> <span class="n">ViewConfigDescriptor</span> <span class="nf">getCurrentViewConfig</span><span class="o">()</span>
+    <span class="o">{</span>
+        <span class="k">return</span> <span class="n">viewConfigResolver</span><span class="o">.</span><span class="na">getViewConfigDescriptor</span><span class="o">(</span><span class="n">FacesContext</span><span class="o">.</span><span class="na">getCurrentInstance</span><span class="o">().</span><span class="na">getViewRoot</span><span class="o">().</span><span class="na">getViewId</span><span class="o">());</span>
+    <span class="o">}</span>
+
+    <span class="kd">public</span> <span class="n">Class</span><span class="o">&lt;?</span> <span class="kd">extends</span> <span class="n">ViewConfig</span><span class="o">&gt;</span> <span class="n">getCurrentViewConfigClass</span><span class="o">()</span>
+    <span class="o">{</span>
+        <span class="k">return</span> <span class="n">viewConfigResolver</span><span class="o">.</span><span class="na">getViewConfigDescriptor</span><span class="o">(</span><span class="n">FacesContext</span><span class="o">.</span><span class="na">getCurrentInstance</span><span class="o">().</span><span class="na">getViewRoot</span><span class="o">().</span><span class="na">getViewId</span><span class="o">()).</span><span class="na">getConfigClass</span><span class="o">();</span>
+    <span class="o">}</span>
+    <span class="c1">//...</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p>For folders it's optional to implement the <code>ViewConfig</code> interface, therefore you see 2 different types of API.
+<code>#getConfigDescriptor</code> as the general API and <code>#getViewConfigDescriptor</code> which is specific for pages (which have to implement the <code>ViewConfig</code> interface).</p>
+<p><strong>Besides</strong> translating a config class to the final path of the folder or page, it's possible to get the implicitly as well as explicitly configured (view-)meta-data and get and/or execute configured callbacks.</p>
+<h2 id="advanced-api-usages">Advanced API usages</h2>
+<p>[TODO]</p>
+<h3 id="creating-custom-meta-data-via-viewmetadata">Creating Custom Meta-Data via @ViewMetaData</h3>
+<p>This meta-annotation allows to create custom view-meta-data which can be used for view-configs. Per default meta-data of a lower level overrides meta-data on a higher level which has the same type. That can be customized via annotating the final annotation as a whole via <code>@Aggregated(true)</code>.</p>
+<div class="codehilite"><pre><span class="nd">@ViewMetaData</span>
+<span class="nd">@interface</span> <span class="n">InfoPage</span>
+<span class="o">{</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p>By just using <code>@InfoPage</code> in view-configs, it can be queried via:</p>
+<div class="codehilite"><pre><span class="nd">@Inject</span>
+<span class="kd">private</span> <span class="n">ViewConfigResolver</span> <span class="n">viewConfigResolver</span><span class="o">;</span>
+<span class="c1">//...</span>
+
+<span class="n">ViewConfigDescriptor</span> <span class="n">viewConfigDescriptor</span> <span class="o">=</span> <span class="n">viewConfigResolver</span><span class="o">.</span><span class="na">getViewConfigDescriptor</span><span class="o">(</span><span class="n">Pages</span><span class="o">.</span><span class="na">Index</span><span class="o">.</span><span class="na">class</span><span class="o">);</span>
+<span class="n">List</span><span class="o">&lt;</span><span class="n">InfoPage</span><span class="o">&gt;</span> <span class="n">metaDataList</span> <span class="o">=</span> <span class="n">viewConfigDescriptor</span><span class="o">.</span><span class="na">getMetaData</span><span class="o">(</span><span class="n">InfoPage</span><span class="o">.</span><span class="na">class</span><span class="o">)</span>
+</pre></div>
+
+
+<h3 id="creating-custom-callbacks-via-viewmetadata">Creating Custom Callbacks via @ViewMetaData</h3>
+<p>Via a custom ConfigPreProcessor it's possible to register custom callbacks dynamically.
+The following listing shows a view-config which adds a simple callback including the corresponding <code>ConfigPreProcessor</code> and <code>ExecutableCallbackDescriptor</code>.</p>
+<div class="codehilite"><pre><span class="nd">@ViewMetaData</span><span class="o">(</span><span class="n">preProcessor</span> <span class="o">=</span> <span class="n">MySecured</span><span class="o">.</span><span class="na">AnnotationPreProcessor</span><span class="o">.</span><span class="na">class</span><span class="o">)</span>
+<span class="kd">public</span> <span class="nd">@interface</span> <span class="n">MySecured</span>
+<span class="o">{</span>
+    <span class="n">Class</span><span class="o">&lt;?</span> <span class="kd">extends</span> <span class="n">TestAccessDecisionVoter</span><span class="o">&gt;[]</span> <span class="n">value</span><span class="o">();</span>
+
+    <span class="kd">class</span> <span class="nc">AnnotationPreProcessor</span> <span class="kd">implements</span> <span class="n">ConfigPreProcessor</span><span class="o">&lt;</span><span class="n">MySecured</span><span class="o">&gt;</span>
+    <span class="o">{</span>
+        <span class="nd">@Override</span>
+        <span class="kd">public</span> <span class="n">MySecured</span> <span class="nf">beforeAddToConfig</span><span class="o">(</span><span class="n">MySecured</span> <span class="n">metaData</span><span class="o">,</span> <span class="n">ViewConfigNode</span> <span class="n">viewConfigNode</span><span class="o">)</span>
+        <span class="o">{</span>
+            <span class="n">List</span><span class="o">&lt;</span><span class="n">CallbackDescriptor</span><span class="o">&gt;</span> <span class="n">descriptors</span> <span class="o">=</span> <span class="n">viewConfigNode</span><span class="o">.</span><span class="na">getCallbackDescriptors</span><span class="o">(</span><span class="n">MySecured</span><span class="o">.</span><span class="na">class</span><span class="o">);</span>
+            <span class="n">descriptors</span><span class="o">.</span><span class="na">add</span><span class="o">(</span><span class="k">new</span> <span class="n">Descriptor</span><span class="o">(</span><span class="n">metaData</span><span class="o">.</span><span class="na">value</span><span class="o">(),</span> <span class="n">DefaultCallback</span><span class="o">.</span><span class="na">class</span><span class="o">));</span>
+            <span class="k">return</span> <span class="n">metaData</span><span class="o">;</span>
+        <span class="o">}</span>
+    <span class="o">}</span>
+
+    <span class="kd">static</span> <span class="kd">class</span> <span class="nc">Descriptor</span> <span class="kd">extends</span> <span class="n">ExecutableCallbackDescriptor</span><span class="o">&lt;</span><span class="n">Set</span><span class="o">&lt;</span><span class="n">String</span><span class="o">&gt;&gt;</span>
+    <span class="o">{</span>
+        <span class="kd">public</span> <span class="nf">Descriptor</span><span class="o">(</span><span class="n">Class</span><span class="o">[]</span> <span class="n">beanClasses</span><span class="o">,</span> <span class="n">Class</span><span class="o">&lt;?</span> <span class="kd">extends</span> <span class="n">Annotation</span><span class="o">&gt;</span> <span class="n">callbackMarker</span><span class="o">)</span>
+        <span class="o">{</span>
+            <span class="kd">super</span><span class="o">(</span><span class="n">beanClasses</span><span class="o">,</span> <span class="n">callbackMarker</span><span class="o">);</span>
+        <span class="o">}</span>
+
+        <span class="kd">public</span> <span class="n">List</span><span class="o">&lt;</span><span class="n">Set</span><span class="o">&lt;</span><span class="n">String</span><span class="o">&gt;&gt;</span> <span class="n">execute</span><span class="o">(</span><span class="n">String</span> <span class="n">param1</span><span class="o">,</span> <span class="n">String</span> <span class="n">param2</span><span class="o">)</span>
+        <span class="o">{</span>
+            <span class="k">return</span> <span class="kd">super</span><span class="o">.</span><span class="na">execute</span><span class="o">(</span><span class="n">param1</span><span class="o">,</span> <span class="n">param2</span><span class="o">);</span>
+        <span class="o">}</span>
+    <span class="o">}</span>
+<span class="o">}</span>
+</pre></div>
+
+
+<p>By just using <code>@MySecured</code> in view-configs, it can be queried and executed via:</p>
+<div class="codehilite"><pre><span class="nd">@Inject</span>
+<span class="kd">private</span> <span class="n">ViewConfigResolver</span> <span class="n">viewConfigResolver</span><span class="o">;</span>
+<span class="c1">//...</span>
+<span class="n">ViewConfigDescriptor</span> <span class="n">viewConfigDescriptor</span> <span class="o">=</span> <span class="n">viewConfigResolver</span><span class="o">.</span><span class="na">getViewConfigDescriptor</span><span class="o">(</span><span class="n">Pages</span><span class="o">.</span><span class="na">Secured</span><span class="o">.</span><span class="na">Index</span><span class="o">.</span><span class="na">class</span><span class="o">);</span>
+
+<span class="n">List</span><span class="o">&lt;</span><span class="n">Set</span><span class="o">&lt;</span><span class="n">String</span><span class="o">&gt;</span> <span class="cm">/*return type of one callback*/</span><span class="o">&gt;</span> <span class="n">callbackResult</span> <span class="o">=</span>
+    <span class="n">viewConfigDescriptor</span><span class="o">.</span><span class="na">getExecutableCallbackDescriptor</span><span class="o">(</span><span class="n">MySecured</span><span class="o">.</span><span class="na">class</span><span class="o">,</span> <span class="n">MySecured</span><span class="o">.</span><span class="na">Descriptor</span><span class="o">.</span><span class="na">class</span><span class="o">)</span>
+        <span class="o">.</span><span class="na">execute</span><span class="o">(</span><span class="s">&quot;param1&quot;</span><span class="o">,</span> <span class="s">&quot;param2&quot;</span><span class="o">);</span>
+</pre></div>
+
+
+<p>It's also possible do register different callback-types per view-meta-data. An example can be found at <code>ViewControllerRef</code> which registers different callback-types for <code>InitView</code>, <code>PreViewAction</code>, <code>PreRenderView</code> and <code>PostRenderView</code>. In this case it's needed to use the type of the callback (= class of the annotation) as additional parameter for <code>#getExecutableCallbackDescriptor</code>.</p>
+<h3 id="creating-custom-inline-meta-data-via-inlineviewmetadata">Creating Custom inline Meta-Data via @InlineViewMetaData</h3>
+<p>This annotation can be used for view-meta-data which can be placed on other classes than view-config-classes. It's used e.g. for <code>@ViewRef</code>.
+Via a <code>TargetViewConfigProvider</code> it's possible to point to the view-config the meta-data should get applied to and via <code>InlineMetaDataTransformer</code> it's possible to convert it to a different meta-data-representation (which allows that at runtime you only have to support one side since the inline-meta-data was converted to the same meta-data representation which is used for the normal view-meta-data).</p>
+<h2 id="view-config-spi">View-Config SPI</h2>
+<p>[TODO]</p>
+<h2 id="activation-of-custom-naming-conventions">Activation of custom naming conventions</h2>
+<h1 id="support-of-ear-deployments">Support of EAR deployments</h1>
+<p>Before using features described by this page, please ensure that you are aware of <a href="https://issues.apache.org/jira/browse/DELTASPIKE-335">DELTASPIKE-335</a> and the corresponding impact.</p>
+<h1 id="hints">Hints</h1>
+<p>Using errorView, DefaultErrorView or ViewNavigationHandler will fail with Weld versions below 1.1.10 due to <a href="https://issues.jboss.org/browse/WELD-1178">WELD-1178</a>.</p>
+          </div>
+      </div>
+
+      <hr>
+
+      <footer>
+        <p>Copyright © 20011-2012 The Apache Software Foundation, Licensed under the Apache License, Version 2.0.</p>
+        <p>Apache and the Apache feather logo are trademarks of The Apache Software Foundation.</p>
+      </footer>
+
+    </div> <!-- /container -->
+
+    <!-- Javascript
+    ================================================== -->
+    <!-- Placed at the end of the document so the pages load faster -->
+    <!--<script src="./deltaspike/resources/js/prettyfy.js"></script> -->
+    <script src="./deltaspike/resources/js/prettyprint.js"></script>
+    <script src="./deltaspike/resources/js/jquery.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-transition.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-alert.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-modal.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-dropdown.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-scrollspy.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-tab.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-tooltip.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-popover.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-button.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-collapse.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-carousel.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-typeahead.js"></script>
+
+</body>
+</html>
\ No newline at end of file

Added: websites/staging/deltaspike/trunk/content/migration-guide.html
==============================================================================
--- websites/staging/deltaspike/trunk/content/migration-guide.html (added)
+++ websites/staging/deltaspike/trunk/content/migration-guide.html Sun Jun  9 09:26:31 2013
@@ -0,0 +1,155 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <meta name="description" content="deltaspike-generate-pages">
+    <meta name="author" content="chm">
+
+    <title>Apache DeltaSpike - Migrate from MyFaces CODI-Core to DeltaSpike</title>
+
+    
+
+    
+    <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with the License.  You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the specific language governing permissions and limitations under the License. -->
+
+    <!-- Styles -->
+    
+    <link href="./deltaspike/resources/css/bootstrap.css" rel="stylesheet">    
+    <!--<link href="./deltaspike/resources/css/prettify.css" rel="stylesheet" /> -->
+    <link href="./deltaspike/resources/css/codehilite.css" rel="stylesheet" />
+    <link href="./deltaspike/resources/css/bootstrap-responsive.css" rel="stylesheet">
+    <style type="text/css">
+        body {
+            padding-top: 60px;
+            padding-bottom: 40px;
+        }
+    </style>
+	<script type="text/javascript">
+
+	  var _gaq = _gaq || [];
+	  _gaq.push(['_setAccount', 'UA-36103647-1']);
+	  _gaq.push(['_trackPageview']);
+	
+	  (function() {
+		var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+		ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+		var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+	  })();
+	
+	</script>
+</head>
+
+<body>
+
+    <div class="navbar navbar-fixed-top">
+        <div class="navbar-inner">
+            <div class="container">
+                <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+                    <span class="icon-bar"></span>
+                    <span class="icon-bar"></span>
+                    <span class="icon-bar"></span>
+                </a>
+                <a class="brand" href="index.html"><img src="./deltaspike/resources/images/deltaspike-logo-medium.png"/></a>
+                <div class="nav-collapse">
+                    <ul class="nav">
+                        <li class="active"><a href="./deltaspike/index.html">Home</a></li>
+                        <li><a href="./deltaspike/documentation.html">Documentation</a></li>
+                        <li><a href="./deltaspike/source.html">Source</a></li>
+                        <!-- <li><a href="./deltaspike/download.html">Download</a></li> -->
+                        <li><a href="./deltaspike/community.html">Community</a></li>
+                        <!-- <li><a href="./deltaspike/support.html">Support</a></li>  -->
+                        <li><a href="./deltaspike/news.html">News</a></li>
+                        <li><a href="./deltaspike/migration-guide.html">Migration</a></li>
+                    </ul>
+                </div><!--/.nav-collapse -->
+                <form id="search-form" action="http://www.google.com/search" method="get"  class="navbar-search pull-right" >
+                    <input value="incubator.apache.org/deltaspike" name="sitesearch" type="hidden"/>
+                    <input class="search-query" name="q" id="query" type="text" />
+                </form>
+            </div>
+        </div>
+    </div>
+
+    <div class="container">
+      <div class="row">
+          <div class="span12">
+              <div class="page-title">
+                <h1>Migrate from MyFaces CODI-Core to DeltaSpike</h1>
+              </div>
+              <h1 id="apache-myfaces-codi-to-apache-deltaspike">Apache MyFaces CODI to Apache DeltaSpike</h1>
+<h2 id="basically-unchanged-parts">Basically unchanged parts</h2>
+<p>Here you can see features which were added and the concept itself didn't change (only the packages, config keys,...)</p>
+<h3 id="project-stage">Project-stage</h3>
+<p>Only the config key changed [TODO]</p>
+<h3 id="deactivatable-and-classdeactivator">Deactivatable and ClassDeactivator</h3>
+<p>The concept hasn't changed.</p>
+<h3 id="codiconfig">CodiConfig</h3>
+<p>The concept hasn't changed.</p>
+<h3 id="annotation-literals">Annotation literals</h3>
+<p>The concept hasn't changed. We just added further implementations.</p>
+<h3 id="beanmanagerprovider">BeanManagerProvider</h3>
+<p>The concept hasn't changed. We just splitted the functionality. The util methods are available in BeanProvider and their name and signature have been unified.</p>
+<h2 id="extended-concepts">Extended concepts</h2>
+<p>Here you can see features which were added and the concept itself changed a bit or got merged with concepts from Seam3</p>
+<h3 id="configuredvalueresolver">ConfiguredValueResolver</h3>
+<p>Here we added more flexibility (esp. re-ordering the default lookup mechanisms). See <code>ConfigResolver</code>, <code>ConfigSourceProvider</code> and <code>ConfigSource</code>.</p>
+<h3 id="projectstageactivated-and-expressionactivated">ProjectStageActivated and ExpressionActivated</h3>
+<p>We merged them with a feature of Seam3 and now it's called <code>@Exclude</code>. That means the basic functionality is still in place (nothing was removed), but the logic is now inverse.</p>
+<h3 id="defaultannotation">DefaultAnnotation</h3>
+<p>(In progress) We merge it with a similar helper of Seam-Solder to provide custom values for annotation attributes.</p>
+<h2 id="postponed-concepts">Postponed concepts</h2>
+<p>We couldn't agree on these features. If you find them useful, please contact the mailing-list. If we see that users need it for reasons we might haven't seen so far, we will discuss it again.</p>
+<h3 id="beannames">BeanNames</h3>
+<h2 id="dropped-concepts">Dropped concepts</h2>
+<h3 id="java-15-support">Java 1.5 Support</h3>
+<h2 id="jsf-module">JSF Module</h2>
+<h3 id="type-safe-view-config">Type-safe view config</h3>
+<p>Changed names:</p>
+<ul>
+<li>@View -&gt; @ViewRef</li>
+<li>@Page -&gt; @View</li>
+<li>@PageBean -&gt; @ViewControllerBean</li>
+<li>@PrePageAction -&gt; @PreViewAction</li>
+<li>@PageParameter -&gt; @NavigationParameter</li>
+<li>PageParameterContext -&gt; NavigationParameterContext</li>
+</ul>
+<p>... ([TODO])</p>
+<h1 id="jboss-seam2-to-apache-deltaspike">JBoss Seam2 to Apache DeltaSpike</h1>
+<p>[TODO]</p>
+<h1 id="jboss-seam3-to-apache-deltaspike">JBoss Seam3 to Apache DeltaSpike</h1>
+<p>[TODO]</p>
+          </div>
+      </div>
+
+      <hr>
+
+      <footer>
+        <p>Copyright © 20011-2012 The Apache Software Foundation, Licensed under the Apache License, Version 2.0.</p>
+        <p>Apache and the Apache feather logo are trademarks of The Apache Software Foundation.</p>
+      </footer>
+
+    </div> <!-- /container -->
+
+    <!-- Javascript
+    ================================================== -->
+    <!-- Placed at the end of the document so the pages load faster -->
+    <!--<script src="./deltaspike/resources/js/prettyfy.js"></script> -->
+    <script src="./deltaspike/resources/js/prettyprint.js"></script>
+    <script src="./deltaspike/resources/js/jquery.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-transition.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-alert.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-modal.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-dropdown.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-scrollspy.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-tab.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-tooltip.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-popover.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-button.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-collapse.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-carousel.js"></script>
+    <script src="./deltaspike/resources/js/bootstrap-typeahead.js"></script>
+
+</body>
+</html>
\ No newline at end of file



Mime
View raw message