[seam-commits] Seam SVN: r7536 - trunk/src/main/org/jboss/seam/navigation.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Tue Mar 11 18:25:31 EDT 2008


Author: norman.richards at jboss.com
Date: 2008-03-11 18:25:31 -0400 (Tue, 11 Mar 2008)
New Revision: 7536

Modified:
   trunk/src/main/org/jboss/seam/navigation/Pages.java
Log:
JBSEAM-2698

Modified: trunk/src/main/org/jboss/seam/navigation/Pages.java
===================================================================
--- trunk/src/main/org/jboss/seam/navigation/Pages.java	2008-03-11 21:29:56 UTC (rev 7535)
+++ trunk/src/main/org/jboss/seam/navigation/Pages.java	2008-03-11 22:25:31 UTC (rev 7536)
@@ -174,16 +174,21 @@
    private Page createPage(String viewId)
    {
       String resourceName = replaceExtension(viewId, ".page.xml");
-      InputStream stream = resourceName==null ? 
-            null : ResourceLoader.instance().getResourceAsStream( resourceName.substring(1) );
-      if ( stream==null ) 
-      {
+      InputStream stream = null;
+      
+      if (resourceName!=null) {
+          stream = ResourceLoader.instance().getResourceAsStream(resourceName.substring(1));
+
+          if (stream == null) {
+              stream = ResourceLoader.instance().getResourceAsStream(resourceName);
+          }
+      }
+   
+      if (stream==null) {
          Page result = new Page(viewId);
          pagesByViewId.put(viewId, result);
          return result;
-      }
-      else
-      {
+      } else {
          parse(stream, viewId);
          return getCachedPage(viewId);
       }




More information about the seam-commits mailing list