forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r488493 - in /forrest/trunk/whiteboard/forrest2/wicket-demo: ./ src/ src/java/org/apache/forrest/examples/reader/ src/java/org/apache/forrest/examples/wicket/ src/test/org/apache/forrest/examples/wicket/ src/xdocs/
Date Tue, 19 Dec 2006 01:32:04 GMT
Author: rgardler
Date: Mon Dec 18 17:32:02 2006
New Revision: 488493

URL: http://svn.apache.org/viewvc?view=rev&rev=488493
Log:
@refactor generalise content creation

Added:
    forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/AuthenticatedWebPage.java
  (with props)
    forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/BasePage.html
  (with props)
    forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/BasePage.java
  (with props)
    forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/Home.html
  (with props)
    forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/LogInPage.html
  (with props)
    forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/LogInPage.java
  (with props)
    forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/LogInSession.java
  (with props)
    forrest/trunk/whiteboard/forrest2/wicket-demo/src/test/org/apache/forrest/examples/wicket/LogInTest.java
  (with props)
Modified:
    forrest/trunk/whiteboard/forrest2/wicket-demo/.wicketprops
    forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/reader/NavigationReader.java
    forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/WelcomePage.html
    forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/WelcomePage.java
    forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/WicketApp.java
    forrest/trunk/whiteboard/forrest2/wicket-demo/src/locationmap.xml
    forrest/trunk/whiteboard/forrest2/wicket-demo/src/xdocs/index.xhtml2
    forrest/trunk/whiteboard/forrest2/wicket-demo/src/xdocs/navigation.xml

Modified: forrest/trunk/whiteboard/forrest2/wicket-demo/.wicketprops
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/wicket-demo/.wicketprops?view=diff&rev=488493&r1=488492&r2=488493
==============================================================================
--- forrest/trunk/whiteboard/forrest2/wicket-demo/.wicketprops (original)
+++ forrest/trunk/whiteboard/forrest2/wicket-demo/.wicketprops Mon Dec 18 17:32:02 2006
@@ -1,2 +1,2 @@
-#Sat Dec 02 23:32:38 GMT 2006
-web.cssPaths=layout.css,style.css,nav.css
+#Fri Dec 08 23:23:39 GMT 2006
+web.cssPaths=layout.css,nav.css

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=488493&r1=488492&r2=488493
==============================================================================
--- 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
Mon Dec 18 17:32:02 2006
@@ -5,14 +5,15 @@
 import org.apache.forrest.core.IController;
 import org.apache.forrest.core.document.AbstractSourceDocument;
 import org.apache.forrest.core.exception.ProcessingException;
-import org.apache.forrest.core.locationMap.Location;
+import org.apache.forrest.core.locationMap.AbstractSourceNode;
+import org.apache.forrest.core.matcher.AbstractMatcher;
 import org.apache.forrest.core.reader.ChainedReader;
 
 public class NavigationReader extends ChainedReader {
 
 	public AbstractSourceDocument read(IController controller, URI requestURI,
-			Location location, URI sourceURI) throws ProcessingException {
-		return super.read(controller, requestURI, location, sourceURI);
+			AbstractSourceNode location, AbstractMatcher matcher) throws ProcessingException {
+		return super.read(controller, requestURI, location, matcher);
 	}
 	
 	public String getDocType() {

Added: forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/AuthenticatedWebPage.java
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/AuthenticatedWebPage.java?view=auto&rev=488493
==============================================================================
--- forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/AuthenticatedWebPage.java
(added)
+++ forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/AuthenticatedWebPage.java
Mon Dec 18 17:32:02 2006
@@ -0,0 +1,13 @@
+package org.apache.forrest.examples.wicket;
+
+/**
+ * If a page should require a user to log in before being
+ * displayed it should extend this class.
+ */
+public class AuthenticatedWebPage extends BasePage {
+
+	public AuthenticatedWebPage() {
+		super();
+		new Forrest2Panel(this, "body", "body/placeholder.html");
+	}
+}

Propchange: forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/AuthenticatedWebPage.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/BasePage.html
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/BasePage.html?view=auto&rev=488493
==============================================================================
--- forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/BasePage.html
(added)
+++ forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/BasePage.html
Mon Dec 18 17:32:02 2006
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:wicket="http://wicket.sourceforge.net/" xml:lang="en" lang="en">
+	<head>
+		<title>Forrest2-Wicket Integration Example</title>
+		<link type="text/css" rel="stylesheet" href="/screen.css" />
+	</head>
+	<body>
+	<div class="container">
+		<div wicket:id="header" id="header">
+			FIXME: Header goes here
+		</div>
+		
+	    <div id="leftbar">
+			<div wicket:id="mainNavigation" id="nav-section">
+				FIXME: mainNavigation goes here
+			</div>
+		</div>
+		
+		<div id="content">
+		  <wicket:child />
+		</div>
+		
+		<div wicket:id="footer" id="footer">
+			FIXME: Footer Goes here
+	    </div>
+	</div>
+	</body>
+</html>

Propchange: forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/BasePage.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/BasePage.java
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/BasePage.java?view=auto&rev=488493
==============================================================================
--- forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/BasePage.java
(added)
+++ forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/BasePage.java
Mon Dec 18 17:32:02 2006
@@ -0,0 +1,28 @@
+package org.apache.forrest.examples.wicket;
+
+import wicket.markup.html.WebPage;
+
+public class BasePage extends WebPage {
+	
+	public BasePage() {
+		String path = this.getRequest().getPath();
+		/*
+		 * When running in the WicketBench (Eclipse IDE Plugin) the test
+		 * environment mounts the application at "/home". We'll stip this
+		 * from the path. Note that this could cause a problem in production
+		 * applications if they use a "/home*" URLspace.
+		 * 
+		 * We need to make the mount point of a WicketBench test configurable.
+		 */
+		if (path.startsWith("/home")) {
+			path = path.substring(5);
+		}
+		// FIXME: the default page request should be configured elsewhere (e.g. web.xml)
+		if (path.length() == 0 || path.equals("/")) {
+			path = "/index.html";
+		}
+		new Forrest2Panel(this, "header", "header" + path);
+		new Forrest2Panel(this, "mainNavigation", "navigation" + path);
+		new Forrest2Panel(this, "footer", "footer" + path);
+	}
+}

Propchange: forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/BasePage.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/Home.html
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/Home.html?view=auto&rev=488493
==============================================================================
--- forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/Home.html
(added)
+++ forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/Home.html
Mon Dec 18 17:32:02 2006
@@ -0,0 +1,12 @@
+<html xmlns:wicket="http://wicket.sourceforge.net/">
+<head>
+    <title>Wicket Examples - signin</title>
+    <link rel="stylesheet" type="text/css" href="style.css"/>
+</head>
+<body>
+    <span wicket:id="mainNavigation"/>
+
+    <h2>Welcome!</h2>
+    
+</body>
+</html>

Propchange: forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/Home.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/LogInPage.html
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/LogInPage.html?view=auto&rev=488493
==============================================================================
--- forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/LogInPage.html
(added)
+++ forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/LogInPage.html
Mon Dec 18 17:32:02 2006
@@ -0,0 +1,38 @@
+<html xmlns:wicket="http://wicket.sourceforge.net/">
+<head>
+    <title>Wicket Examples - signin</title>
+    <link rel="stylesheet" type="text/css" href="style.css"/>
+</head>
+<body>
+    <wicket:extend>
+
+    <span wicket:id = "feedback"/>
+    <p>
+    <i>Username and password are both "wicket"</i>
+    </p>
+    <p>
+	<form wicket:id = "signInForm">
+		<table>
+			<tr>
+			  <td align = "right">Username:</td>
+			  <td>
+			    <input wicket:id = "username" type = "text" value = "foo@goo.moo" size = "30"/>
+	          </td>
+			</tr>
+			<tr>
+			  <td align = "right">Password:</td>
+			  <td>
+			    <input wicket:id = "password" type = "password" value = "password" hidden = "1"
size="30"/>
+			  </td>
+			</tr>
+			<tr>
+			  <td></td>
+			  <td>
+                <input type = "submit" value = "Sign In"/>
+              </td>
+			</tr>
+		</table>	
+	</form>
+	</wicket:extend>
+</body>
+</html>

Propchange: forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/LogInPage.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/LogInPage.java
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/LogInPage.java?view=auto&rev=488493
==============================================================================
--- forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/LogInPage.java
(added)
+++ forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/LogInPage.java
Mon Dec 18 17:32:02 2006
@@ -0,0 +1,87 @@
+package org.apache.forrest.examples.wicket;
+
+import wicket.MarkupContainer;
+import wicket.PageParameters;
+import wicket.Session;
+import wicket.markup.html.form.PasswordTextField;
+import wicket.markup.html.form.StatelessForm;
+import wicket.markup.html.form.TextField;
+import wicket.markup.html.panel.FeedbackPanel;
+import wicket.model.PropertyModel;
+import wicket.util.value.ValueMap;
+
+/**
+ * Simple example of a sign in page.
+ * 
+ * @author Jonathan Locke
+ */
+public final class LogInPage extends BasePage {
+	/**
+	 * Constructor
+	 */
+	public LogInPage() {
+		this(null);
+	}
+
+	/**
+	 * Constructor
+	 * 
+	 * @param parameters
+	 *            The page parameters
+	 */
+	public LogInPage(final PageParameters parameters) {
+		super();
+		// Create feedback panel and add to page
+		new FeedbackPanel(this, "feedback");
+
+		// Add sign-in form to page, passing feedback panel as validation error
+		// handler
+		new SignInForm(this, "signInForm");
+	}
+
+	/**
+	 * Sign in form
+	 * 
+	 * @author Jonathan Locke
+	 */
+	public final class SignInForm extends StatelessForm {
+		// El-cheapo model for form
+		private final ValueMap properties = new ValueMap();
+
+		/**
+		 * Constructor
+		 * 
+		 * @param parent
+		 * @param id
+		 *            id of the form component
+		 */
+		public SignInForm(MarkupContainer parent, final String id) {
+			super(parent, id);
+
+			// Attach textfield components that edit properties map model
+			new TextField<String>(this, "username", new PropertyModel<String>(
+					properties, "username"));
+			new PasswordTextField(this, "password", new PropertyModel<String>(
+					properties, "password"));
+		}
+
+		/**
+		 * @see wicket.markup.html.form.Form#onSubmit()
+		 */
+		@Override
+		public final void onSubmit() {
+			LogInSession session = (LogInSession) getSession();
+
+			if (session.authenticate(properties.getString("username"),
+					properties.getString("password"))) {
+				if (!continueToOriginalDestination()) {
+					setResponsePage(new WelcomePage());
+				}
+			} else {
+				final String errmsg = getLocalizer().getString("loginError",
+						this, "Unable to sign you in");
+				error(errmsg);
+			}
+		}
+	}
+}

Propchange: forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/LogInPage.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/LogInSession.java
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/LogInSession.java?view=auto&rev=488493
==============================================================================
--- forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/LogInSession.java
(added)
+++ forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/LogInSession.java
Mon Dec 18 17:32:02 2006
@@ -0,0 +1,75 @@
+package org.apache.forrest.examples.wicket;
+
+import wicket.protocol.http.WebApplication;
+import wicket.protocol.http.WebSession;
+
+/**
+ * Session class for signin example. Holds and authenticates users.
+ * 
+ * @author Jonathan Locke
+ */
+public final class LogInSession extends WebSession
+{
+	/** Trivial user representation */
+	private String user;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param application
+	 *            The application
+	 */
+	protected LogInSession(final WebApplication application)
+	{
+		super(application);
+	}
+
+	/**
+	 * Checks the given username and password, returning a User object if if the
+	 * username and password identify a valid user.
+	 * 
+	 * @param username
+	 *            The username
+	 * @param password
+	 *            The password
+	 * @return True if the user was authenticated
+	 */
+	public final boolean authenticate(final String username, final String password)
+	{
+		if (user == null)
+		{
+			// Trivial password "db"
+			if ("wicket".equalsIgnoreCase(username) && "wicket".equalsIgnoreCase(password))
+			{
+				user = username;
+			}
+		}
+
+		return user != null;
+	}
+
+	/**
+	 * @return True if user is signed in
+	 */
+	public boolean isSignedIn()
+	{
+		return user != null;
+	}
+
+	/**
+	 * @return User
+	 */
+	public String getUser()
+	{
+		return user;
+	}
+
+	/**
+	 * @param user
+	 *            New user
+	 */
+	public void setUser(final String user)
+	{
+		this.user = user;
+	}
+}

Propchange: forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/LogInSession.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/WelcomePage.html
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/WelcomePage.html?view=diff&rev=488493&r1=488492&r2=488493
==============================================================================
--- forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/WelcomePage.html
(original)
+++ forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/WelcomePage.html
Mon Dec 18 17:32:02 2006
@@ -6,24 +6,10 @@
 		<link type="text/css" rel="stylesheet" href="/screen.css" />
 	</head>
 	<body>
-	<div class="container">
-		<div wicket:id="header" id="header">
-			FIXME: Header goes here
+	  <wicket:extend>
+		<div wicket:id="body">
+			FIXME: Body goes here
 		</div>
-		
-		    <div id="leftbar">
-				<div wicket:id="mainNavigation" id="nav-section">
-					FIXME: mainNavigation goes here
-				</div>
-			</div>
-			
-			<div wicket:id="body" id="content">
-				FIXME: Body goes here
-			</div>
-		
-		<div wicket:id="footer" id="footer">
-			FIXME: Footer Goes here
-	    </div>
-	</div>
+	  </wicket:extend>
 	</body>
 </html>

Modified: forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/WelcomePage.java
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/WelcomePage.java?view=diff&rev=488493&r1=488492&r2=488493
==============================================================================
--- forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/WelcomePage.java
(original)
+++ forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/WelcomePage.java
Mon Dec 18 17:32:02 2006
@@ -1,10 +1,9 @@
 package org.apache.forrest.examples.wicket;
 
-import wicket.markup.html.WebPage;
-
-public class WelcomePage extends WebPage {
+public class WelcomePage extends AuthenticatedWebPage {
 	
 	public WelcomePage() {
+		super();
 		String path = this.getRequest().getPath();
 		/*
 		 * When running in the WicketBench (Eclipse IDE Plugin) the test
@@ -21,9 +20,6 @@
 		if (path.length() == 0 || path.equals("/")) {
 			path = "/index.html";
 		}
-		new Forrest2Panel(this, "header", "header" + path);
-		new Forrest2Panel(this, "mainNavigation", "navigation" + path);
 		new Forrest2Panel(this, "body", "body" + path);
-		new Forrest2Panel(this, "footer", "footer" + path);
 	}
 }

Modified: forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/WicketApp.java
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/WicketApp.java?view=diff&rev=488493&r1=488492&r2=488493
==============================================================================
--- forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/WicketApp.java
(original)
+++ forrest/trunk/whiteboard/forrest2/wicket-demo/src/java/org/apache/forrest/examples/wicket/WicketApp.java
Mon Dec 18 17:32:02 2006
@@ -1,18 +1,67 @@
 package org.apache.forrest.examples.wicket;
 
+import wicket.Component;
+import wicket.ISessionFactory;
+import wicket.Request;
+import wicket.RestartResponseAtInterceptPageException;
+import wicket.Session;
+import wicket.authorization.Action;
+import wicket.authorization.IAuthorizationStrategy;
 import wicket.protocol.http.WebApplication;
 
 /**
  * @author Ross Gardler
  */
 public class WicketApp extends WebApplication {
-    public WicketApp() {
-        
-    }
+	public WicketApp() {
+
+	}
 
 	@Override
 	public Class<WelcomePage> getHomePage() {
 		return WelcomePage.class;
 	}
+
+	/**
+	 * @see wicket.examples.WicketExampleApplication#init()
+	 */
+	@Override
+	protected void init() {
+		getSecuritySettings().setAuthorizationStrategy(
+				new IAuthorizationStrategy() {
+					public boolean isActionAuthorized(Component component,
+							Action action) {
+						return true;
+					}
+
+					public boolean isInstantiationAuthorized(
+							Class componentClass) {
+						if (AuthenticatedWebPage.class
+								.isAssignableFrom(componentClass)) {
+							// Is user signed in?
+							if (((LogInSession) Session.get()).isSignedIn()) {
+								// okay to proceed
+								return true;
+							}
+
+							// Force sign in
+							throw new RestartResponseAtInterceptPageException(
+									LogInPage.class);
+						}
+						return true;
+					}
+				});
+	}
+
+	/**
+	 * @see wicket.protocol.http.WebApplication#getSessionFactory()
+	 */
+	@Override
+	public ISessionFactory getSessionFactory() {
+		return new ISessionFactory() {
+			public Session newSession(Request request) {
+				return new LogInSession(WicketApp.this);
+			}
+		};
+	}
 }
-  
\ No newline at end of file

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=488493&r1=488492&r2=488493
==============================================================================
--- forrest/trunk/whiteboard/forrest2/wicket-demo/src/locationmap.xml (original)
+++ forrest/trunk/whiteboard/forrest2/wicket-demo/src/locationmap.xml Mon Dec 18 17:32:02
2006
@@ -26,6 +26,13 @@
     <source href="navigation:classpath:/navigation.xml"/>
   </location>
   
+  <!-- 
+  <location regexp="body/.*forrest2/docs/(.*/)*(.*)\..*">
+    <source href="file:///D:/openSource/forrest/whiteboard/forrest2/core/src/docs/$(1)$(2).html"/>
+    <source href="classpath:/notFound.xhtml2"/>
+  </location>
+  -->
+  
   <location regexp="body/(.*/)*(.*)\..*">
     <source href="classpath:/$(1)$(2).xhtml2"/>
     <source href="classpath:/$(1)notFound.xhtml2"/>

Added: forrest/trunk/whiteboard/forrest2/wicket-demo/src/test/org/apache/forrest/examples/wicket/LogInTest.java
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/wicket-demo/src/test/org/apache/forrest/examples/wicket/LogInTest.java?view=auto&rev=488493
==============================================================================
--- forrest/trunk/whiteboard/forrest2/wicket-demo/src/test/org/apache/forrest/examples/wicket/LogInTest.java
(added)
+++ forrest/trunk/whiteboard/forrest2/wicket-demo/src/test/org/apache/forrest/examples/wicket/LogInTest.java
Mon Dec 18 17:32:02 2006
@@ -0,0 +1,20 @@
+package org.apache.forrest.examples.wicket;
+
+import wicket.Component;
+import wicket.MarkupContainer;
+import wicketbench.junit.WicketBenchTestCase;
+import wicketbench.web.IComponentFactory;
+
+public class LogInTest extends WicketBenchTestCase {
+
+	@Override
+	public IComponentFactory<?> createFactory() {
+		return new IComponentFactory() {
+			public Component createComponent(MarkupContainer container, String id) {
+            	LogInPage page = new LogInPage();
+                return page;
+			}
+        };
+	}
+
+}

Propchange: forrest/trunk/whiteboard/forrest2/wicket-demo/src/test/org/apache/forrest/examples/wicket/LogInTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: forrest/trunk/whiteboard/forrest2/wicket-demo/src/xdocs/index.xhtml2
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/wicket-demo/src/xdocs/index.xhtml2?view=diff&rev=488493&r1=488492&r2=488493
==============================================================================
--- forrest/trunk/whiteboard/forrest2/wicket-demo/src/xdocs/index.xhtml2 (original)
+++ forrest/trunk/whiteboard/forrest2/wicket-demo/src/xdocs/index.xhtml2 Mon Dec 18 17:32:02
2006
@@ -15,6 +15,7 @@
     
     <p>Here are some pages to visit:</p>
     <ul>
+      <li><a href="index.html.forrestPipeline">The pipeline that generates this
page</a></li>
       <li><a href="subdir/index.html">Sub-Directory Index</a></li>
     </ul>
   </body>

Modified: 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=diff&rev=488493&r1=488492&r2=488493
==============================================================================
--- forrest/trunk/whiteboard/forrest2/wicket-demo/src/xdocs/navigation.xml (original)
+++ forrest/trunk/whiteboard/forrest2/wicket-demo/src/xdocs/navigation.xml Mon Dec 18 17:32:02
2006
@@ -8,5 +8,5 @@
     </item>
     <item label="Item 2.2"/>
   </item>
-  <item label="Item 3"/>
+  <item label="Forrest2 Docs" href="forrest2/docs/readme.html"/>
 </navigation>



Mime
View raw message