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/05/07 20:20:12 UTC

svn commit: r535941 - in /incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/velocity: DynamicPage.html DynamicPage.java

Author: ehillenius
Date: Mon May  7 11:20:11 2007
New Revision: 535941

URL: http://svn.apache.org/viewvc?view=rev&rev=535941
Log:
more tweaks

Modified:
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/velocity/DynamicPage.html
    incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/velocity/DynamicPage.java

Modified: incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/velocity/DynamicPage.html
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/velocity/DynamicPage.html?view=diff&rev=535941&r1=535940&r2=535941
==============================================================================
--- incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/velocity/DynamicPage.html (original)
+++ incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/velocity/DynamicPage.html Mon May  7 11:20:11 2007
@@ -5,18 +5,18 @@
 </head>
 <body>
 
- <span wicket:id="mainNavigation"/>
-		<div style="border: 2px dotted #fc0; padding: 5px; margin-right: 25%;">
-			The fields in this page are driven by your data model, creating a new field will automatically add it to the
-			layout.  This allows to build generic editors <b>without writing the associated Wicket template</b>.
-		</div>
+	<span wicket:id="mainNavigation"/>
+ 
+	<div style="border: 2px dotted #fc0; padding: 5px; margin-right: 25%;">
+		The fields in this page are driven by your data model, creating a new field will automatically add it to the
+		layout.  This allows to build generic editors <b>without writing the associated Wicket template</b>.
+	</div>
+	<div id="templateOutputBox">
+		<fieldset>
+			<legend>output</legend>
+			<span wicket:id="templatePanel">Template output will be put here</span>
+		</fieldset>
+	</div>
 
-
- <div id="templateOutputBox">
-  <fieldset>
-    <legend>output</legend>
-	<span wicket:id="templatePanel">Template output will be put here</span>
-  </fieldset>
- </div>
 </body>
 </html>

Modified: incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/velocity/DynamicPage.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/velocity/DynamicPage.java?view=diff&rev=535941&r1=535940&r2=535941
==============================================================================
--- incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/velocity/DynamicPage.java (original)
+++ incubator/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/velocity/DynamicPage.java Mon May  7 11:20:11 2007
@@ -32,17 +32,9 @@
 
 /**
  * Template example page.
- * 
- * @author Eelco Hillenius
  */
 public class DynamicPage extends WicketExamplePage
 {
-	/** the current template contents. */
-	private PackageResourceStream template = new PackageResourceStream(DynamicPage.class,
-			"fields.vm");
-	/** context to be used by the template. */
-	private final Model templateContext;
-
 	/**
 	 * Constructor
 	 * 
@@ -51,13 +43,15 @@
 	 */
 	public DynamicPage(final PageParameters parameters)
 	{
+		final IStringResourceStream template = new PackageResourceStream(DynamicPage.class,
+				"fields.vm");
+
 		Map<String, List<Field>> map = new HashMap<String, List<Field>>();
 		List<Field> fields = VelocityTemplateApplication.getFields();
 		map.put("fields", fields);
-		templateContext = Model.valueOf(map);
 
 		VelocityPanel panel;
-		add(panel = new VelocityPanel("templatePanel", templateContext)
+		add(panel = new VelocityPanel("templatePanel", Model.valueOf(map))
 		{
 			@Override
 			protected IStringResourceStream getTemplateResource()