You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by eh...@apache.org on 2007/06/17 22:01:08 UTC

svn commit: r548101 - in /incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template: ./ border/ pageinheritance/

Author: ehillenius
Date: Sun Jun 17 13:01:05 2007
New Revision: 548101

URL: http://svn.apache.org/viewvc?view=rev&rev=548101
Log:
reworked template example so that it shows how to achieve roughly the same using borders

Added:
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/Index.html
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/Index.java
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/border/
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/border/Page1.html
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/border/Page1.java
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/border/Page2.html
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/border/Page2.java
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/border/TemplateBorder.html
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/border/TemplateBorder.java
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/pageinheritance/
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/pageinheritance/Page1.html
      - copied unchanged from r547968, incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/Page1.html
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/pageinheritance/Page1.java
      - copied, changed from r548095, incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/Page1.java
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/pageinheritance/Page2.html
      - copied unchanged from r547968, incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/Page2.html
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/pageinheritance/Page2.java
      - copied, changed from r548095, incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/Page2.java
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/pageinheritance/Panel1.html
      - copied unchanged from r548095, incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/Panel1.html
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/pageinheritance/Panel1.java
      - copied, changed from r548095, incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/Panel1.java
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/pageinheritance/TemplatePage.html
      - copied unchanged from r547968, incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/TemplatePage.html
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/pageinheritance/TemplatePage.java
      - copied, changed from r547968, incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/TemplatePage.java
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/pageinheritance/TemplatePanel.html
      - copied unchanged from r547968, incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/TemplatePanel.html
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/pageinheritance/TemplatePanel.java
      - copied, changed from r548095, incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/TemplatePanel.java
Removed:
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/Page1.html
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/Page1.java
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/Page2.html
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/Page2.java
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/Panel1.html
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/Panel1.java
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/TemplatePage.html
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/TemplatePage.java
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/TemplatePanel.html
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/TemplatePanel.java
Modified:
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/TemplateApplication.java

Added: incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/Index.html
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/Index.html?view=auto&rev=548101
==============================================================================
--- incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/Index.html (added)
+++ incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/Index.html Sun Jun 17 13:01:05 2007
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org/">
+<head>
+    <title>Wicket Examples - template</title>
+    <link rel="stylesheet" type="text/css" href="style.css" />
+</head>
+<body>
+    <span wicket:id="mainNavigation" />
+
+	<h1>Template example</h1>
+
+	<p style="border: 2px dotted #fc0; width: 500px; padding: 5px;">
+	This example shows two different ways of building your page up from shared parts.
+	The first example uses what we commonly call 'markup inheritence',
+	and the second example shows how to achieve roughly the same
+	using borders.<br />
+	&nbsp;&nbsp;Compare the examples and decides what works best for you. You will find that markup
+	inheritance is usually easier to work with, and you'll rarely have the need to work with
+	borders. But in some cases borders make sense, and can be a little bit more flexible.<br />
+	&nbsp;&nbsp;Also note the use of panels and component replacement to switch the banner.
+	Component replacement can be a powerful alternative to navigating between pages.
+	</p>
+
+	<p>
+		<wicket:link>
+		<ul>
+		 <li><a href="pageinheritance/Page1.html">templating using markup inheritance</a></li>
+		 <li><a href="border/Page1.html">templating using a border</a></li>
+		</ul>
+		</wicket:link>
+	</p>
+
+</body>
+</html>

Added: incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/Index.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/Index.java?view=auto&rev=548101
==============================================================================
--- incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/Index.java (added)
+++ incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/Index.java Sun Jun 17 13:01:05 2007
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.examples.template;
+
+import org.apache.wicket.examples.WicketExamplePage;
+
+/**
+ * Home page of the template example.
+ * 
+ * @author Eelco Hillenius
+ */
+public class Index extends WicketExamplePage
+{
+	/**
+	 * Constructor
+	 */
+	public Index()
+	{
+	}
+}
\ No newline at end of file

Modified: incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/TemplateApplication.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/TemplateApplication.java?view=diff&rev=548101&r1=548100&r2=548101
==============================================================================
--- incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/TemplateApplication.java (original)
+++ incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/TemplateApplication.java Sun Jun 17 13:01:05 2007
@@ -35,9 +35,9 @@
 	/**
 	 * @see org.apache.wicket.Application#getHomePage()
 	 */
-	public Class getHomePage()
+	public Class< ? > getHomePage()
 	{
-		return Page1.class;
+		return Index.class;
 	}
 
 }

Added: incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/border/Page1.html
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/border/Page1.html?view=auto&rev=548101
==============================================================================
--- incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/border/Page1.html (added)
+++ incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/border/Page1.html Sun Jun 17 13:01:05 2007
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html xmlns="http://www.w3.org/1999/xhtml" >
+<head>
+    <title>Template example, page 1</title>
+    <link rel="stylesheet" type="text/css" href="style.css"/>
+    <link rel="stylesheet" type="text/css" href="template/style.css"/>
+</head>
+<body>
+
+	<span wicket:id="mainNavigation"/>
+
+	<span wicket:id="border">
+
+Lorem ipsum dolor sit amet, consectetuer
+adipiscing elit. Donec sed velit sit amet arcu commodo aliquet. Nunc
+consectetuer. Donec sollicitudin congue justo. Etiam wisi nisl, vehicula
+eget, mattis quis, imperdiet quis, lorem. Sed mattis, massa vitae
+laoreet imperdiet, ligula mauris convallis orci, eu blandit ante lorem
+nec mi. Nullam ac neque. Nunc pulvinar urna vel urna. Integer auctor
+ligula ut wisi. Sed pretium metus et nunc. Etiam eu nibh. Nulla
+facilisis aliquam risus. Nunc a leo. Ut lorem wisi, molestie nec,
+adipiscing nec, euismod at, est. Nunc posuere interdum ipsum. Donec eu
+odio. Maecenas imperdiet. Pellentesque habitant morbi tristique senectus
+et netus et malesuada fames ac turpis egestas. Maecenas vehicula tellus
+pulvinar elit. Cras dictum justo. Suspendisse aliquet tortor eget quam.
+Nam ut ipsum nec diam mollis accumsan. Suspendisse ut leo eget velit
+gravida eleifend. Lorem ipsum dolor sit amet, consectetuer adipiscing
+elit. Maecenas lacinia aliquet augue.
+
+<p>
+ <span wickett:id="panel1">contents here</span>
+</p>
+	
+	</span><!-- end of border -->
+
+</body>
+</html>

Added: incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/border/Page1.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/border/Page1.java?view=auto&rev=548101
==============================================================================
--- incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/border/Page1.java (added)
+++ incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/border/Page1.java Sun Jun 17 13:01:05 2007
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.examples.template.border;
+
+import org.apache.wicket.examples.WicketExamplePage;
+
+
+/**
+ * Page that adds a template border for layout.
+ * 
+ * @author Eelco Hillenius
+ */
+public class Page1 extends WicketExamplePage
+{
+	/**
+	 * Constructor
+	 */
+	public Page1()
+	{
+		super();
+		add(new TemplateBorder("border"));
+	}
+}
\ No newline at end of file

Added: incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/border/Page2.html
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/border/Page2.html?view=auto&rev=548101
==============================================================================
--- incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/border/Page2.html (added)
+++ incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/border/Page2.html Sun Jun 17 13:01:05 2007
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html xmlns="http://www.w3.org/1999/xhtml" >
+<head>
+    <title>Template example, page 2</title>
+    <link rel="stylesheet" type="text/css" href="style.css"/>
+    <link rel="stylesheet" type="text/css" href="template/style.css"/>
+</head>
+<body>
+
+	<span wicket:id="mainNavigation"/>
+
+	<span wicket:id="border">
+
+Lorem ipsum dolor sit amet, consectetuer
+adipiscing elit. Cras eros lorem, varius ac, malesuada eget, luctus
+quis, nibh. Donec commodo, magna et facilisis posuere, massa enim
+egestas quam, non egestas sem elit ut eros. Nullam porttitor, elit id
+placerat rutrum, metus leo ultrices sapien, in auctor mi elit et lectus.
+Vestibulum commodo elementum lacus. Donec felis odio, bibendum et,
+convallis et, ullamcorper nec, dolor. Suspendisse potenti. Sed tellus.
+In egestas. Nulla sem massa, placerat malesuada, feugiat blandit, luctus
+a, mauris. Sed sit amet elit. Mauris a leo. Maecenas hendrerit tincidunt
+risus. Suspendisse odio purus, sagittis et, placerat vel, bibendum eu,
+sem. Nam rutrum elit nec libero. Curabitur elit felis, lacinia nec,
+porttitor at, bibendum at, wisi. Praesent vestibulum molestie dui. Cras
+porttitor urna nec sem. Pellentesque sed magna at purus fringilla
+laoreet. Donec lorem. Donec luctus pede at justo. Ut auctor pede at
+lorem. Praesent ornare neque a mauris. Morbi vestibulum. Aliquam erat
+volutpat. Cras eros. Donec eget lorem. Duis scelerisque metus nec
+ligula. In massa sapien, laoreet sit amet, ullamcorper et, auctor in,
+pede. Phasellus est mauris, pulvinar viverra, iaculis id, elementum in,
+justo. Nullam mollis ligula eget sem. Praesent at urna. Maecenas leo
+neque, fermentum accumsan, tincidunt at, suscipit eu, wisi.
+	
+	</span><!-- end of border -->
+
+</body>
+</html>

Added: incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/border/Page2.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/border/Page2.java?view=auto&rev=548101
==============================================================================
--- incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/border/Page2.java (added)
+++ incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/border/Page2.java Sun Jun 17 13:01:05 2007
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.examples.template.border;
+
+import org.apache.wicket.examples.WicketExamplePage;
+
+/**
+ * Page that adds a template border for layout.
+ * 
+ * @author Eelco Hillenius
+ */
+public class Page2 extends WicketExamplePage
+{
+	/**
+	 * Constructor
+	 */
+	public Page2()
+	{
+		add(new TemplateBorder("border"));
+	}
+}
\ No newline at end of file

Added: incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/border/TemplateBorder.html
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/border/TemplateBorder.html?view=auto&rev=548101
==============================================================================
--- incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/border/TemplateBorder.html (added)
+++ incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/border/TemplateBorder.html Sun Jun 17 13:01:05 2007
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html xmlns="http://www.w3.org/1999/xhtml" >
+<head>
+    <title wicket:id="title">title comes here</title>
+    <link rel="stylesheet" type="text/css" href="style.css"/>
+    <link rel="stylesheet" type="text/css" href="template/style.css"/>
+</head>
+<body>
+
+<wicket:border>
+
+	<div id="header" class="borderedBlock">
+	 <table width="100%">
+	  <tr>
+	   <td id="ad">
+		 <span wicket:id="ad">ad comes here</span>
+	   </td>
+	   <td id="changeAddButton">
+		 <input type="button" wicket:id="changeAdLink" value="change ad" />
+	   </td>
+	  </tr>
+	 </table>
+	</div>
+
+	<table width="100%">
+
+	  <tr>
+	    <td id="left" class="borderedBlock">
+		 <ul>
+		  <li><a href="#" wicket:id="page1Link">Page 1</a></li>
+		  <li><a href="#" wicket:id="page2Link">Page 2</a></li>
+		 </ul>
+		</td>
+		<td id="content" class="borderedBlock">
+			<wicket:body />
+		</td>
+	  </tr>
+
+	</table>
+
+	<div id="footer" class="borderedBlock">
+	 footer
+	</div>
+
+</wicket:border>
+
+</body>
+</html>

Added: incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/border/TemplateBorder.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/border/TemplateBorder.java?view=auto&rev=548101
==============================================================================
--- incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/border/TemplateBorder.java (added)
+++ incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/border/TemplateBorder.java Sun Jun 17 13:01:05 2007
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.examples.template.border;
+
+import org.apache.wicket.examples.template.Banner;
+import org.apache.wicket.examples.template.Banner1;
+import org.apache.wicket.examples.template.Banner2;
+import org.apache.wicket.markup.html.border.Border;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+import org.apache.wicket.markup.html.link.Link;
+
+/**
+ * Border that holds layout elements that can be reused by pages.
+ * 
+ * @author Eelco Hillenius
+ */
+public class TemplateBorder extends Border
+{
+	/** the current banner. */
+	private Banner currentBanner;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param id
+	 */
+	public TemplateBorder(String id)
+	{
+		super(id);
+		add(currentBanner = new Banner1("ad"));
+		add(new Link("changeAdLink")
+		{
+			/**
+			 * @see org.apache.wicket.markup.html.link.Link#onClick()
+			 */
+			public void onClick()
+			{
+				if (currentBanner.getClass() == Banner1.class)
+				{
+					TemplateBorder.this.replace(currentBanner = new Banner2("ad"));
+				}
+				else
+				{
+					TemplateBorder.this.replace(currentBanner = new Banner1("ad"));
+				}
+			}
+		});
+		add(new BookmarkablePageLink("page1Link", Page1.class));
+		add(new BookmarkablePageLink("page2Link", Page2.class));
+	}
+}
\ No newline at end of file

Copied: incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/pageinheritance/Page1.java (from r548095, incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/Page1.java)
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/pageinheritance/Page1.java?view=diff&rev=548101&p1=incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/Page1.java&r1=548095&p2=incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/pageinheritance/Page1.java&r2=548101
==============================================================================
--- incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/Page1.java (original)
+++ incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/pageinheritance/Page1.java Sun Jun 17 13:01:05 2007
@@ -14,8 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.wicket.examples.template;
-
+package org.apache.wicket.examples.template.pageinheritance;
 
 /**
  * Concrete page. Note that it extends {@link TemplatePage} and the markup uses
@@ -31,7 +30,6 @@
 	 */
 	public Page1()
 	{
-		super();
 		setPageTitle("Template example, page 1");
 		add(new Panel1("panel1"));
 	}

Copied: incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/pageinheritance/Page2.java (from r548095, incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/Page2.java)
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/pageinheritance/Page2.java?view=diff&rev=548101&p1=incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/Page2.java&r1=548095&p2=incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/pageinheritance/Page2.java&r2=548101
==============================================================================
--- incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/Page2.java (original)
+++ incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/pageinheritance/Page2.java Sun Jun 17 13:01:05 2007
@@ -14,8 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.wicket.examples.template;
-
+package org.apache.wicket.examples.template.pageinheritance;
 
 /**
  * Concrete page. Note that it extends {@link TemplatePage} and the markup uses
@@ -31,7 +30,6 @@
 	 */
 	public Page2()
 	{
-		super();
 		setPageTitle("Template example, page 2");
 	}
 }

Copied: incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/pageinheritance/Panel1.java (from r548095, incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/Panel1.java)
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/pageinheritance/Panel1.java?view=diff&rev=548101&p1=incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/Panel1.java&r1=548095&p2=incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/pageinheritance/Panel1.java&r2=548101
==============================================================================
--- incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/Panel1.java (original)
+++ incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/pageinheritance/Panel1.java Sun Jun 17 13:01:05 2007
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.wicket.examples.template;
+package org.apache.wicket.examples.template.pageinheritance;
 
 import org.apache.wicket.model.IModel;
 

Copied: incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/pageinheritance/TemplatePage.java (from r547968, incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/TemplatePage.java)
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/pageinheritance/TemplatePage.java?view=diff&rev=548101&p1=incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/TemplatePage.java&r1=547968&p2=incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/pageinheritance/TemplatePage.java&r2=548101
==============================================================================
--- incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/TemplatePage.java (original)
+++ incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/pageinheritance/TemplatePage.java Sun Jun 17 13:01:05 2007
@@ -14,19 +14,21 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.wicket.examples.template;
+package org.apache.wicket.examples.template.pageinheritance;
 
 import org.apache.wicket.examples.WicketExamplePage;
+import org.apache.wicket.examples.template.Banner;
+import org.apache.wicket.examples.template.Banner1;
+import org.apache.wicket.examples.template.Banner2;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.link.BookmarkablePageLink;
 import org.apache.wicket.markup.html.link.Link;
 import org.apache.wicket.model.PropertyModel;
 
-
 /**
- * Our base page that serves as a template for pages that inherit from it.
- * Doesn't have to be abstract, but was made abstract here to stress the fact
- * that this page is not meant for direct use.
+ * Base page that serves as a template for pages that inherit from it. Doesn't
+ * have to be abstract, but was made abstract here to stress the fact that this
+ * page is not meant for direct use.
  * 
  * @author Eelco Hillenius
  */
@@ -85,15 +87,5 @@
 	public final void setPageTitle(String title)
 	{
 		this.pageTitle = title;
-	}
-
-	/**
-	 * @see org.apache.wicket.Component#isVersioned()
-	 */
-	public boolean isVersioned()
-	{
-		// TODO Bug: Versioning gives problems... probably has to do with markup
-		// inheritance
-		return false;
 	}
 }

Copied: incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/pageinheritance/TemplatePanel.java (from r548095, incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/TemplatePanel.java)
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/pageinheritance/TemplatePanel.java?view=diff&rev=548101&p1=incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/TemplatePanel.java&r1=548095&p2=incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/pageinheritance/TemplatePanel.java&r2=548101
==============================================================================
--- incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/TemplatePanel.java (original)
+++ incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/template/pageinheritance/TemplatePanel.java Sun Jun 17 13:01:05 2007
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.wicket.examples.template;
+package org.apache.wicket.examples.template.pageinheritance;
 
 import org.apache.wicket.markup.html.panel.Panel;
 import org.apache.wicket.model.IModel;