Author: pete.muir(a)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)
Show replies by date