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

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Wed Sep 17 07:01:33 EDT 2008


Author: pete.muir at jboss.org
Date: 2008-09-17 07:01:32 -0400 (Wed, 17 Sep 2008)
New Revision: 9007

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

Modified: trunk/src/main/org/jboss/seam/navigation/Pages.java
===================================================================
--- trunk/src/main/org/jboss/seam/navigation/Pages.java	2008-09-17 10:52:49 UTC (rev 9006)
+++ trunk/src/main/org/jboss/seam/navigation/Pages.java	2008-09-17 11:01:32 UTC (rev 9007)
@@ -117,22 +117,23 @@
    
    public void initialize()
    {
-       pagesByViewId = Collections.synchronizedMap(new HashMap<String, Page>());   
-       pageStacksByViewId = Collections.synchronizedMap(new HashMap<String, List<Page>>());   
-       conversations = Collections.synchronizedMap(new HashMap<String, ConversationIdParameter>());
+      pagesByViewId = Collections.synchronizedMap(new HashMap<String, Page>());   
+      pageStacksByViewId = Collections.synchronizedMap(new HashMap<String, List<Page>>());   
+      conversations = Collections.synchronizedMap(new HashMap<String, ConversationIdParameter>());
 
-       for (String resource: resources) {
-           InputStream stream = ResourceLoader.instance().getResourceAsStream(resource);      
-           if (stream==null) {
-               log.info("no pages.xml file found: " + resource);
-           } else {
-               log.debug("reading pages.xml file: " + resource);
-               parse(stream);
-           }
-       }
-       
-       parsePages(hotDotPageDotXmlFileNames, dotPageDotXmlFileNames);
-       
+      for (String resource: resources) 
+      {
+         InputStream stream = ResourceLoader.instance().getResourceAsStream(resource);      
+         if (stream==null) 
+         {
+            log.info("no pages.xml file found: " + resource);
+         } else {
+            log.debug("reading pages.xml file: " + resource);
+            parse(stream);
+         }
+      }
+
+      parsePages(hotDotPageDotXmlFileNames, dotPageDotXmlFileNames);
    }
    
    private void parsePages(Set<String> ...fileNames)
@@ -144,7 +145,11 @@
       }
       for (String fileName: mergedFileNames)  
       {
-         String viewId = "/" + fileName.substring(0,fileName.length()-".page.xml".length()) + ".xhtml"; // needs more here
+         if (!fileName.startsWith("/"))
+         {
+            fileName = "/" + fileName;
+         }
+         String viewId = fileName.substring(0,fileName.length()-".page.xml".length()) + ".xhtml"; // needs more here
          
          InputStream stream = ResourceLoader.instance().getResourceAsStream(fileName);      
          if (stream==null) 




More information about the seam-commits mailing list