deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject git commit: DELTASPIKE-416 unified path handling
Date Sat, 02 Nov 2013 10:54:22 GMT
Updated Branches:
  refs/heads/master 5a2fb3012 -> 2f6d6ea62


DELTASPIKE-416 unified path handling


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

Branch: refs/heads/master
Commit: 2f6d6ea62dbc4fee9e765547dbd65fb267e282f7
Parents: 5a2fb30
Author: gpetracek <gpetracek@apache.org>
Authored: Sat Nov 2 11:47:30 2013 +0100
Committer: gpetracek <gpetracek@apache.org>
Committed: Sat Nov 2 11:49:58 2013 +0100

----------------------------------------------------------------------
 .../deltaspike/jsf/api/config/view/Folder.java  | 41 ++++++++++++++-
 .../deltaspike/jsf/api/config/view/View.java    | 38 +++++++++++++-
 .../navigation/destination/uc005/Pages.java     | 35 +++++++++++++
 .../destination/uc005/ViewConfigPathTest.java   | 53 ++++++++++++++++----
 .../navigation/syntax/uc004/ViewConfigTest.java |  2 +-
 .../navigation/syntax/uc005/ViewConfigTest.java |  4 +-
 .../navigation/syntax/uc006/ViewConfigTest.java |  4 +-
 7 files changed, 160 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/2f6d6ea6/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/Folder.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/Folder.java
b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/Folder.java
index 618eb5f..4edfeae 100644
--- a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/Folder.java
+++ b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/Folder.java
@@ -26,9 +26,12 @@ import org.apache.deltaspike.core.util.ClassUtils;
 import org.apache.deltaspike.jsf.api.literal.FolderLiteral;
 import org.apache.deltaspike.jsf.util.NamingConventionUtils;
 
+import java.lang.annotation.Annotation;
 import java.lang.annotation.Documented;
 import java.lang.annotation.Retention;
 import java.lang.annotation.Target;
+import java.util.Iterator;
+import java.util.Set;
 
 import static java.lang.annotation.ElementType.TYPE;
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
@@ -79,11 +82,30 @@ public @interface Folder
 
             if (defaultValueReplaced)
             {
-                return new FolderLiteral(name, folder.folderNameBuilder());
+                Folder result = new FolderLiteral(name, folder.folderNameBuilder());
+                updateNodeMetaData(viewConfigNode, result);
+                return result;
             }
             return folder;
         }
 
+        private void updateNodeMetaData(ViewConfigNode viewConfigNode, Folder folder)
+        {
+            Set<Annotation> metaData = viewConfigNode.getMetaData();
+
+            Iterator<? extends Annotation> metaDataIterator = metaData.iterator();
+
+            while (metaDataIterator.hasNext())
+            {
+                if (Folder.class.equals(metaDataIterator.next().annotationType()))
+                {
+                    metaDataIterator.remove();
+                    break;
+                }
+            }
+            metaData.add(folder);
+        }
+
         private NameBuilder getFolderNameBuilder(Folder folder)
         {
             NameBuilder folderNameBuilder;
@@ -131,8 +153,9 @@ public @interface Folder
 
             if (name == null /*null used as marker value for dyn. added instances*/ || ".".equals(name)
/*default*/)
             {
-                this.defaultValueReplaced = true;
                 name = NamingConventionUtils.toPath(viewConfigNode);
+
+                this.defaultValueReplaced = true;
             }
 
             if (name != null && name.startsWith("."))
@@ -142,6 +165,20 @@ public @interface Folder
                 this.defaultValueReplaced = true;
             }
 
+            if (name != null && !name.startsWith(".") && !name.startsWith("/"))
+            {
+                name = NamingConventionUtils.toPath(viewConfigNode.getParent()) + name;
+
+                this.defaultValueReplaced = true;
+            }
+
+            if (name != null && !name.endsWith("/"))
+            {
+                name = name + "/";
+
+                this.defaultValueReplaced = true;
+            }
+
             if (name != null && name.contains("//"))
             {
                 name = name.replace("//", "/");

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/2f6d6ea6/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/View.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/View.java
b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/View.java
index 2209ff7..24e3bbe 100644
--- a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/View.java
+++ b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/View.java
@@ -26,10 +26,13 @@ import org.apache.deltaspike.core.util.ClassUtils;
 import org.apache.deltaspike.jsf.api.literal.ViewLiteral;
 import org.apache.deltaspike.jsf.util.NamingConventionUtils;
 
+import java.lang.annotation.Annotation;
 import java.lang.annotation.Documented;
 import java.lang.annotation.Retention;
 import java.lang.annotation.Target;
 import java.lang.reflect.Modifier;
+import java.util.Iterator;
+import java.util.Set;
 
 import static java.lang.annotation.ElementType.TYPE;
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
@@ -192,12 +195,31 @@ public @interface View
 
             if (defaultValueReplaced)
             {
-                return new ViewLiteral(basePath, name, extension, navigation, viewParams,
+                View result = new ViewLiteral(basePath, name, extension, navigation, viewParams,
                         view.basePathBuilder(), view.fileNameBuilder(), view.extensionBuilder());
+                updateNodeMetaData(viewConfigNode, result);
+                return result;
             }
             return view;
         }
 
+        private void updateNodeMetaData(ViewConfigNode viewConfigNode, View view)
+        {
+            Set<Annotation> metaData = viewConfigNode.getMetaData();
+
+            Iterator<? extends Annotation> metaDataIterator = metaData.iterator();
+
+            while (metaDataIterator.hasNext())
+            {
+                if (View.class.equals(metaDataIterator.next().annotationType()))
+                {
+                    metaDataIterator.remove();
+                    break;
+                }
+            }
+            metaData.add(view);
+        }
+
         private NameBuilder getBasePathBuilder(View view)
         {
             NameBuilder basePathBuilder;
@@ -324,6 +346,20 @@ public @interface View
                 this.defaultValueReplaced = true;
             }
 
+            if (basePath != null && !basePath.startsWith(".") && !basePath.startsWith("/"))
+            {
+                basePath = NamingConventionUtils.toPath(viewConfigNode.getParent()) + basePath;
+
+                this.defaultValueReplaced = true;
+            }
+
+            if (basePath != null && !basePath.endsWith("/"))
+            {
+                basePath = basePath + "/";
+
+                this.defaultValueReplaced = true;
+            }
+
             if (basePath != null && basePath.contains("//"))
             {
                 basePath = basePath.replace("//", "/");

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/2f6d6ea6/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc005/Pages.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc005/Pages.java
b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc005/Pages.java
index 64220c0..4abf19b 100644
--- a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc005/Pages.java
+++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc005/Pages.java
@@ -55,6 +55,11 @@ interface Pages
         class Step6 implements ViewConfig
         {
         }
+
+        @View(basePath = "w1b")
+        class Step7 implements ViewConfig
+        {
+        }
     }
 
     @View(basePath = "w2") //gets ignored because @Folder should be used instead
@@ -89,6 +94,11 @@ interface Pages
         class Step6 implements ViewConfig
         {
         }
+
+        @View(basePath = "w2b")
+        class Step7 implements ViewConfig
+        {
+        }
     }
 
     @View(basePath = "/w3") //gets ignored because @Folder should be used instead
@@ -98,6 +108,11 @@ interface Pages
         class Step1 implements ViewConfig
         {
         }
+
+        @View(basePath = "/")
+        class Step2 implements ViewConfig
+        {
+        }
     }
 
     @View(basePath = "./w4b") //gets ignored because @Folder should be used instead
@@ -107,6 +122,11 @@ interface Pages
         class Step1 implements ViewConfig
         {
         }
+
+        @View(basePath = "/")
+        class Step2 implements ViewConfig
+        {
+        }
     }
 
     @View(basePath = "w5/") //gets ignored because @Folder should be used instead
@@ -189,6 +209,11 @@ interface Pages
         class Step6 implements ViewConfig
         {
         }
+
+        @View(basePath = "w11b")
+        class Step7 implements ViewConfig
+        {
+        }
     }
 
     @Folder(name = "/w12/")
@@ -223,6 +248,11 @@ interface Pages
         class Step6 implements ViewConfig
         {
         }
+
+        @View(basePath = "w12b")
+        class Step7 implements ViewConfig
+        {
+        }
     }
 
     @Folder(name = "./w13a/")
@@ -257,6 +287,11 @@ interface Pages
         class Step6 implements ViewConfig
         {
         }
+
+        @View(basePath = "w13b")
+        class Step7 implements ViewConfig
+        {
+        }
     }
 
     @Folder(name = "./")

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/2f6d6ea6/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc005/ViewConfigPathTest.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc005/ViewConfigPathTest.java
b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc005/ViewConfigPathTest.java
index de5fefa..a39e27a 100644
--- a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc005/ViewConfigPathTest.java
+++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/destination/uc005/ViewConfigPathTest.java
@@ -55,6 +55,7 @@ public class ViewConfigPathTest
         this.viewConfigExtension.addPageDefinition(Pages.Wizard1.Step4.class);
         this.viewConfigExtension.addPageDefinition(Pages.Wizard1.Step5.class);
         this.viewConfigExtension.addPageDefinition(Pages.Wizard1.Step6.class);
+        this.viewConfigExtension.addPageDefinition(Pages.Wizard1.Step7.class);
 
         ViewConfigResolver viewConfigResolver = this.viewConfigResolverProducer.createViewConfigResolver();
 
@@ -75,7 +76,7 @@ public class ViewConfigPathTest
 
         viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard1.Step4.class);
         Assert.assertNotNull(viewConfigDescriptor);
-        Assert.assertEquals("w1/step4.xhtml", viewConfigDescriptor.getViewId());
+        Assert.assertEquals("/pages/wizard1/w1/step4.xhtml", viewConfigDescriptor.getViewId());
 
         viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard1.Step5.class);
         Assert.assertNotNull(viewConfigDescriptor);
@@ -84,6 +85,10 @@ public class ViewConfigPathTest
         viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard1.Step6.class);
         Assert.assertNotNull(viewConfigDescriptor);
         Assert.assertEquals("/pages/wizard1/w1b/step6.xhtml", viewConfigDescriptor.getViewId());
+
+        viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard1.Step7.class);
+        Assert.assertNotNull(viewConfigDescriptor);
+        Assert.assertEquals("/pages/wizard1/w1b/step7.xhtml", viewConfigDescriptor.getViewId());
     }
 
     @Test
@@ -95,6 +100,7 @@ public class ViewConfigPathTest
         this.viewConfigExtension.addPageDefinition(Pages.Wizard2.Step4.class);
         this.viewConfigExtension.addPageDefinition(Pages.Wizard2.Step5.class);
         this.viewConfigExtension.addPageDefinition(Pages.Wizard2.Step6.class);
+        this.viewConfigExtension.addPageDefinition(Pages.Wizard2.Step7.class);
 
         ViewConfigResolver viewConfigResolver = this.viewConfigResolverProducer.createViewConfigResolver();
 
@@ -115,7 +121,7 @@ public class ViewConfigPathTest
 
         viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard2.Step4.class);
         Assert.assertNotNull(viewConfigDescriptor);
-        Assert.assertEquals("w2/step4.xhtml", viewConfigDescriptor.getViewId());
+        Assert.assertEquals("/pages/wizard2/w2/step4.xhtml", viewConfigDescriptor.getViewId());
 
         viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard2.Step5.class);
         Assert.assertNotNull(viewConfigDescriptor);
@@ -124,12 +130,17 @@ public class ViewConfigPathTest
         viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard2.Step6.class);
         Assert.assertNotNull(viewConfigDescriptor);
         Assert.assertEquals("/pages/wizard2/w2b/step6.xhtml", viewConfigDescriptor.getViewId());
+
+        viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard2.Step7.class);
+        Assert.assertNotNull(viewConfigDescriptor);
+        Assert.assertEquals("/pages/wizard2/w2b/step7.xhtml", viewConfigDescriptor.getViewId());
     }
 
     @Test
     public void testNamesWizard3()
     {
         this.viewConfigExtension.addPageDefinition(Pages.Wizard3.Step1.class);
+        this.viewConfigExtension.addPageDefinition(Pages.Wizard3.Step2.class);
 
         ViewConfigResolver viewConfigResolver = this.viewConfigResolverProducer.createViewConfigResolver();
 
@@ -139,12 +150,17 @@ public class ViewConfigPathTest
         viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard3.Step1.class);
         Assert.assertNotNull(viewConfigDescriptor);
         Assert.assertEquals("/pages/wizard3/step1.xhtml", viewConfigDescriptor.getViewId());
+
+        viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard3.Step2.class);
+        Assert.assertNotNull(viewConfigDescriptor);
+        Assert.assertEquals("/step2.xhtml", viewConfigDescriptor.getViewId());
     }
 
     @Test
     public void testNamesWizard4()
     {
         this.viewConfigExtension.addPageDefinition(Pages.Wizard4.Step1.class);
+        this.viewConfigExtension.addPageDefinition(Pages.Wizard4.Step2.class);
 
         ViewConfigResolver viewConfigResolver = this.viewConfigResolverProducer.createViewConfigResolver();
 
@@ -154,6 +170,10 @@ public class ViewConfigPathTest
         viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard4.Step1.class);
         Assert.assertNotNull(viewConfigDescriptor);
         Assert.assertEquals("/pages/wizard4/step1.xhtml", viewConfigDescriptor.getViewId());
+
+        viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard4.Step2.class);
+        Assert.assertNotNull(viewConfigDescriptor);
+        Assert.assertEquals("/step2.xhtml", viewConfigDescriptor.getViewId());
     }
 
     @Test
@@ -213,7 +233,7 @@ public class ViewConfigPathTest
 
         viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard8.Step1.class);
         Assert.assertNotNull(viewConfigDescriptor);
-        Assert.assertEquals("w8/step1.xhtml", viewConfigDescriptor.getViewId());
+        Assert.assertEquals("/pages/w8/step1.xhtml", viewConfigDescriptor.getViewId());
     }
 
     @Test
@@ -255,6 +275,7 @@ public class ViewConfigPathTest
         this.viewConfigExtension.addPageDefinition(Pages.Wizard11.Step4.class);
         this.viewConfigExtension.addPageDefinition(Pages.Wizard11.Step5.class);
         this.viewConfigExtension.addPageDefinition(Pages.Wizard11.Step6.class);
+        this.viewConfigExtension.addPageDefinition(Pages.Wizard11.Step7.class);
 
         ViewConfigResolver viewConfigResolver = this.viewConfigResolverProducer.createViewConfigResolver();
 
@@ -263,7 +284,7 @@ public class ViewConfigPathTest
 
         viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard11.Step1.class);
         Assert.assertNotNull(viewConfigDescriptor);
-        Assert.assertEquals("w11/step1.xhtml", viewConfigDescriptor.getViewId());
+        Assert.assertEquals("/pages/w11/step1.xhtml", viewConfigDescriptor.getViewId());
 
         viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard11.Step2.class);
         Assert.assertNotNull(viewConfigDescriptor);
@@ -271,11 +292,11 @@ public class ViewConfigPathTest
 
         viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard11.Step3.class);
         Assert.assertNotNull(viewConfigDescriptor);
-        Assert.assertEquals("w11/step3.xhtml", viewConfigDescriptor.getViewId());
+        Assert.assertEquals("/pages/w11/step3.xhtml", viewConfigDescriptor.getViewId());
 
         viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard11.Step4.class);
         Assert.assertNotNull(viewConfigDescriptor);
-        Assert.assertEquals("w11b/step4.xhtml", viewConfigDescriptor.getViewId());
+        Assert.assertEquals("/pages/w11/w11b/step4.xhtml", viewConfigDescriptor.getViewId());
 
         viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard11.Step5.class);
         Assert.assertNotNull(viewConfigDescriptor);
@@ -283,7 +304,11 @@ public class ViewConfigPathTest
 
         viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard11.Step6.class);
         Assert.assertNotNull(viewConfigDescriptor);
-        Assert.assertEquals("w11/w11b/step6.xhtml", viewConfigDescriptor.getViewId());
+        Assert.assertEquals("/pages/w11/w11b/step6.xhtml", viewConfigDescriptor.getViewId());
+
+        viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard11.Step7.class);
+        Assert.assertNotNull(viewConfigDescriptor);
+        Assert.assertEquals("/pages/w11/w11b/step7.xhtml", viewConfigDescriptor.getViewId());
     }
 
     @Test
@@ -295,6 +320,7 @@ public class ViewConfigPathTest
         this.viewConfigExtension.addPageDefinition(Pages.Wizard12.Step4.class);
         this.viewConfigExtension.addPageDefinition(Pages.Wizard12.Step5.class);
         this.viewConfigExtension.addPageDefinition(Pages.Wizard12.Step6.class);
+        this.viewConfigExtension.addPageDefinition(Pages.Wizard12.Step7.class);
 
         ViewConfigResolver viewConfigResolver = this.viewConfigResolverProducer.createViewConfigResolver();
 
@@ -315,7 +341,7 @@ public class ViewConfigPathTest
 
         viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard12.Step4.class);
         Assert.assertNotNull(viewConfigDescriptor);
-        Assert.assertEquals("w12b/step4.xhtml", viewConfigDescriptor.getViewId());
+        Assert.assertEquals("/w12/w12b/step4.xhtml", viewConfigDescriptor.getViewId());
 
         viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard12.Step5.class);
         Assert.assertNotNull(viewConfigDescriptor);
@@ -324,6 +350,10 @@ public class ViewConfigPathTest
         viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard12.Step6.class);
         Assert.assertNotNull(viewConfigDescriptor);
         Assert.assertEquals("/w12/w12b/step6.xhtml", viewConfigDescriptor.getViewId());
+
+        viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard12.Step7.class);
+        Assert.assertNotNull(viewConfigDescriptor);
+        Assert.assertEquals("/w12/w12b/step7.xhtml", viewConfigDescriptor.getViewId());
     }
 
     @Test
@@ -335,6 +365,7 @@ public class ViewConfigPathTest
         this.viewConfigExtension.addPageDefinition(Pages.Wizard13.Step4.class);
         this.viewConfigExtension.addPageDefinition(Pages.Wizard13.Step5.class);
         this.viewConfigExtension.addPageDefinition(Pages.Wizard13.Step6.class);
+        this.viewConfigExtension.addPageDefinition(Pages.Wizard13.Step7.class);
 
         ViewConfigResolver viewConfigResolver = this.viewConfigResolverProducer.createViewConfigResolver();
 
@@ -355,7 +386,7 @@ public class ViewConfigPathTest
 
         viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard13.Step4.class);
         Assert.assertNotNull(viewConfigDescriptor);
-        Assert.assertEquals("w13b/step4.xhtml", viewConfigDescriptor.getViewId());
+        Assert.assertEquals("/pages/w13a/w13b/step4.xhtml", viewConfigDescriptor.getViewId());
 
         viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard13.Step5.class);
         Assert.assertNotNull(viewConfigDescriptor);
@@ -364,6 +395,10 @@ public class ViewConfigPathTest
         viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard13.Step6.class);
         Assert.assertNotNull(viewConfigDescriptor);
         Assert.assertEquals("/pages/w13a/w13b/step6.xhtml", viewConfigDescriptor.getViewId());
+
+        viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard13.Step7.class);
+        Assert.assertNotNull(viewConfigDescriptor);
+        Assert.assertEquals("/pages/w13a/w13b/step7.xhtml", viewConfigDescriptor.getViewId());
     }
 
     @Test(expected = IllegalStateException.class)

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/2f6d6ea6/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/syntax/uc004/ViewConfigTest.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/syntax/uc004/ViewConfigTest.java
b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/syntax/uc004/ViewConfigTest.java
index fde43e4..c86ccdb 100644
--- a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/syntax/uc004/ViewConfigTest.java
+++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/syntax/uc004/ViewConfigTest.java
@@ -276,7 +276,7 @@ public class ViewConfigTest
         Assert.assertEquals(View.ViewParameterMode.INCLUDE, configDescriptor.getMetaData(View.class).iterator().next().viewParams());
         //the following is correct because it's @View at the folder level:
         Assert.assertEquals("", configDescriptor.getMetaData(View.class).iterator().next().name());
-        Assert.assertEquals("", configDescriptor.getMetaData(View.class).iterator().next().basePath());
+        Assert.assertEquals("/pages/", configDescriptor.getMetaData(View.class).iterator().next().basePath());
         Assert.assertEquals("xhtml", configDescriptor.getMetaData(View.class).iterator().next().extension());
 
 

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/2f6d6ea6/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/syntax/uc005/ViewConfigTest.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/syntax/uc005/ViewConfigTest.java
b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/syntax/uc005/ViewConfigTest.java
index 878e564..2cd2aeb 100644
--- a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/syntax/uc005/ViewConfigTest.java
+++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/syntax/uc005/ViewConfigTest.java
@@ -284,7 +284,7 @@ public class ViewConfigTest
         Assert.assertEquals(View.ViewParameterMode.EXCLUDE, configDescriptor.getMetaData(View.class).iterator().next().viewParams());
         //the following is correct because it's @View at the folder level:
         Assert.assertEquals("", configDescriptor.getMetaData(View.class).iterator().next().name());
-        Assert.assertEquals("", configDescriptor.getMetaData(View.class).iterator().next().basePath());
+        Assert.assertEquals("/pages/", configDescriptor.getMetaData(View.class).iterator().next().basePath());
         Assert.assertEquals("xhtml", configDescriptor.getMetaData(View.class).iterator().next().extension());
 
 
@@ -303,7 +303,7 @@ public class ViewConfigTest
         Assert.assertEquals(View.ViewParameterMode.INCLUDE, configDescriptor.getMetaData(View.class).iterator().next().viewParams());
         //the following is correct because it's @View at the folder level:
         Assert.assertEquals("", configDescriptor.getMetaData(View.class).iterator().next().name());
-        Assert.assertEquals("", configDescriptor.getMetaData(View.class).iterator().next().basePath());
+        Assert.assertEquals("/pages/admin/", configDescriptor.getMetaData(View.class).iterator().next().basePath());
         Assert.assertEquals("xhtml", configDescriptor.getMetaData(View.class).iterator().next().extension());
 
 

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/2f6d6ea6/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/syntax/uc006/ViewConfigTest.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/syntax/uc006/ViewConfigTest.java
b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/syntax/uc006/ViewConfigTest.java
index 3c48992..966015d 100644
--- a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/syntax/uc006/ViewConfigTest.java
+++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/syntax/uc006/ViewConfigTest.java
@@ -269,7 +269,7 @@ public class ViewConfigTest
         Assert.assertEquals(View.ViewParameterMode.EXCLUDE, configDescriptor.getMetaData(View.class).iterator().next().viewParams());
         //the following is correct because it's @View at the folder level:
         Assert.assertEquals("", configDescriptor.getMetaData(View.class).iterator().next().name());
-        Assert.assertEquals("", configDescriptor.getMetaData(View.class).iterator().next().basePath());
+        Assert.assertEquals("/pages/", configDescriptor.getMetaData(View.class).iterator().next().basePath());
         Assert.assertEquals("jsf", configDescriptor.getMetaData(View.class).iterator().next().extension());
 
 
@@ -288,7 +288,7 @@ public class ViewConfigTest
         Assert.assertEquals(View.ViewParameterMode.INCLUDE, configDescriptor.getMetaData(View.class).iterator().next().viewParams());
         //the following is correct because it's @View at the folder level:
         Assert.assertEquals("", configDescriptor.getMetaData(View.class).iterator().next().name());
-        Assert.assertEquals("", configDescriptor.getMetaData(View.class).iterator().next().basePath());
+        Assert.assertEquals("/pages/admin/", configDescriptor.getMetaData(View.class).iterator().next().basePath());
         Assert.assertEquals("faces", configDescriptor.getMetaData(View.class).iterator().next().extension());
 
 


Mime
View raw message