forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r481427 - in /forrest/trunk/whiteboard/forrest2/wicket-demo/src: java/org/apache/forrest/examples/reader/NavigationReader.java locationmap.xml xdocs/navigation.xml
Date Fri, 01 Dec 2006 22:13:01 GMT
Author: rgardler
Date: Fri Dec  1 14:13:00 2006
New Revision: 481427

URL: http://svn.apache.org/viewvc?view=rev&rev=481427
Log:
Navigation reader extends ChainedReader and reads the navigation file from the filesystem

Added:
    forrest/trunk/whiteboard/forrest2/wicket-demo/src/xdocs/navigation.xml   (with props)
Modified:
    forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/reader/NavigationReader.java
    forrest/trunk/whiteboard/forrest2/wicket-demo/src/locationmap.xml

Modified: forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/reader/NavigationReader.java
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/reader/NavigationReader.java?view=diff&rev=481427&r1=481426&r2=481427
==============================================================================
--- forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/reader/NavigationReader.java
(original)
+++ forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/reader/NavigationReader.java
Fri Dec  1 14:13:00 2006
@@ -1,24 +1,22 @@
 package org.apache.forrest.examples.reader;
 
-import java.net.MalformedURLException;
 import java.net.URI;
 
 import org.apache.forrest.core.IController;
 import org.apache.forrest.core.document.AbstractSourceDocument;
-import org.apache.forrest.core.document.XMLSourceDocument;
 import org.apache.forrest.core.exception.ProcessingException;
 import org.apache.forrest.core.locationMap.Location;
-import org.apache.forrest.core.reader.AbstractReader;
+import org.apache.forrest.core.reader.ChainedReader;
 
-public class NavigationReader extends AbstractReader {
+public class NavigationReader extends ChainedReader {
 
 	public AbstractSourceDocument read(IController controller, URI requestURI,
-			Location location, URI sourceURI) throws MalformedURLException,
-			ProcessingException {
-		String content = "<navigation><item label=\"Item 1\"/><item label=\"Item
2\"/><item label=\"Item 3\"/></navigation>";
-		String type = "org.apache.forrest.example.Navigation";
-		XMLSourceDocument doc = new XMLSourceDocument(requestURI, content, type);
-		return doc;
+			Location location, URI sourceURI) throws ProcessingException {
+		return super.read(controller, requestURI, location, sourceURI);
+	}
+	
+	public String getDocType() {
+		return "org.apache.forrest.example.Navigation";
 	}
 
 }

Modified: forrest/trunk/whiteboard/forrest2/wicket-demo/src/locationmap.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/wicket-demo/src/locationmap.xml?view=diff&rev=481427&r1=481426&r2=481427
==============================================================================
--- forrest/trunk/whiteboard/forrest2/wicket-demo/src/locationmap.xml (original)
+++ forrest/trunk/whiteboard/forrest2/wicket-demo/src/locationmap.xml Fri Dec  1 14:13:00
2006
@@ -22,7 +22,7 @@
   </location>
   
   <location pattern="navigation/(.*)\..*">
-    <source href="navigation:/$(1)"/>
+    <source href="navigation:classpath:/navigation.xml"/>
   </location>
   
   <location pattern="body/(.*)\..*">

Added: forrest/trunk/whiteboard/forrest2/wicket-demo/src/xdocs/navigation.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/wicket-demo/src/xdocs/navigation.xml?view=auto&rev=481427
==============================================================================
--- forrest/trunk/whiteboard/forrest2/wicket-demo/src/xdocs/navigation.xml (added)
+++ forrest/trunk/whiteboard/forrest2/wicket-demo/src/xdocs/navigation.xml Fri Dec  1 14:13:00
2006
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<navigation>
+  <item label="Item 1"/>
+  <item label="Item 2"/>
+  <item label="Item 3"/>
+</navigation>
\ No newline at end of file

Propchange: forrest/trunk/whiteboard/forrest2/wicket-demo/src/xdocs/navigation.xml
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message