You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by kn...@apache.org on 2009/03/28 18:59:33 UTC

svn commit: r759530 - in /wicket/sandbox/knopp/experimental: ./ wicket-ng-webapp/src/ wicket-ng-webapp/src/main/ wicket-ng-webapp/src/main/java/ wicket-ng-webapp/src/main/java/org/ wicket-ng-webapp/src/main/java/org/apache/ wicket-ng-webapp/src/main/ja...

Author: knopp
Date: Sat Mar 28 17:59:32 2009
New Revision: 759530

URL: http://svn.apache.org/viewvc?rev=759530&view=rev
Log:
check in

Added:
    wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/
    wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/main/
    wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/main/java/
    wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/main/java/org/
    wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/main/java/org/apache/
    wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/main/java/org/apache/wicket/
    wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/main/java/org/apache/wicket/ngwebapp/
    wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/main/java/org/apache/wicket/ngwebapp/NGApplication.java   (with props)
    wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/main/java/org/apache/wicket/ngwebapp/TestPage1.java   (with props)
    wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/main/resources/
    wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/main/webapp/
    wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/main/webapp/WEB-INF/
    wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/main/webapp/WEB-INF/web.xml   (with props)
    wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/test/
    wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/test/java/
    wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/test/java/org/
    wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/test/java/org/apache/
    wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/test/java/org/apache/wicket/
    wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/test/java/org/apache/wicket/ngwebapp/
    wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/test/java/org/apache/wicket/ngwebapp/StartExamples.java   (with props)
    wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/test/resources/
Modified:
    wicket/sandbox/knopp/experimental/pom.xml

Modified: wicket/sandbox/knopp/experimental/pom.xml
URL: http://svn.apache.org/viewvc/wicket/sandbox/knopp/experimental/pom.xml?rev=759530&r1=759529&r2=759530&view=diff
==============================================================================
--- wicket/sandbox/knopp/experimental/pom.xml (original)
+++ wicket/sandbox/knopp/experimental/pom.xml Sat Mar 28 17:59:32 2009
@@ -31,6 +31,8 @@
 			</activation>
 			<modules>
 				<module>wicket</module>
+				<module>wicket-ng</module>
+				<module>wicket-ng-webapp</module>
 				<module>wicket-datetime</module>
 				<module>wicket-extensions</module>
 				<module>wicket-ioc</module>
@@ -98,6 +100,8 @@
 			-->
 			<modules>
 				<module>wicket</module>
+				<module>wicket-ng</module>
+				<module>wicket-ng-webapp</module>
 				<module>wicket-datetime</module>
 				<module>wicket-extensions</module>
 				<module>wicket-ioc</module>
@@ -169,6 +173,8 @@
 			</activation>
 			<modules>
 				<module>wicket</module>
+				<module>wicket-ng</module>
+				<module>wicket-ng-webapp</module>
 				<module>wicket-datetime</module>
 				<module>wicket-extensions</module>
 				<module>wicket-ioc</module>
@@ -256,6 +262,20 @@
 			</dependency>
 			<dependency>
 				<groupId>org.apache.wicket</groupId>
+				<artifactId>wicket-ng</artifactId>
+				<version>${project.version}</version>
+				<type>jar</type>
+			</dependency>
+			<dependency>
+				<groupId>org.apache.wicket</groupId>
+				<artifactId>wicket-ng</artifactId>
+				<version>${project.version}</version>
+				<type>jar</type>
+				<classifier>tests</classifier>
+			</dependency>
+			
+			<dependency>
+				<groupId>org.apache.wicket</groupId>
 				<artifactId>wicket-extensions</artifactId>
 				<version>${project.version}</version>
 				<type>jar</type>

Added: wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/main/java/org/apache/wicket/ngwebapp/NGApplication.java
URL: http://svn.apache.org/viewvc/wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/main/java/org/apache/wicket/ngwebapp/NGApplication.java?rev=759530&view=auto
==============================================================================
--- wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/main/java/org/apache/wicket/ngwebapp/NGApplication.java (added)
+++ wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/main/java/org/apache/wicket/ngwebapp/NGApplication.java Sat Mar 28 17:59:32 2009
@@ -0,0 +1,27 @@
+package org.apache.wicket.ngwebapp;
+
+import org.apache.wicket.IPage;
+import org.apache.wicket.protocol.http.WebApplication;
+import org.apache.wicket.request.encoder.MountedEncoder;
+
+public class NGApplication extends WebApplication
+{
+
+	public NGApplication()
+	{
+		super();
+	}
+	
+	@Override
+	public void init()
+	{
+		mount(new MountedEncoder("MyTestPage", TestPage1.class));
+	}
+	
+	@Override
+	public Class<? extends IPage> getHomePageClass()
+	{
+		return TestPage1.class;
+	}
+
+}

Propchange: wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/main/java/org/apache/wicket/ngwebapp/NGApplication.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/main/java/org/apache/wicket/ngwebapp/TestPage1.java
URL: http://svn.apache.org/viewvc/wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/main/java/org/apache/wicket/ngwebapp/TestPage1.java?rev=759530&view=auto
==============================================================================
--- wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/main/java/org/apache/wicket/ngwebapp/TestPage1.java (added)
+++ wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/main/java/org/apache/wicket/ngwebapp/TestPage1.java Sat Mar 28 17:59:32 2009
@@ -0,0 +1,21 @@
+package org.apache.wicket.ngwebapp;
+
+import org.apache.wicket.Page;
+import org.apache.wicket.RequestCycle;
+
+public class TestPage1 extends Page
+{
+
+	public TestPage1()
+	{
+		
+	}
+
+	@Override
+	public void renderPage()
+	{
+		super.renderPage();
+		
+		RequestCycle.get().getResponse().write("This is my beautiful test page!");
+	}
+}

Propchange: wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/main/java/org/apache/wicket/ngwebapp/TestPage1.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/main/webapp/WEB-INF/web.xml?rev=759530&view=auto
==============================================================================
--- wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/main/webapp/WEB-INF/web.xml (added)
+++ wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/main/webapp/WEB-INF/web.xml Sat Mar 28 17:59:32 2009
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   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.
+-->
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+         version="2.4">
+
+	<display-name>Wicket NG WebApp</display-name>
+	
+	<!-- only available with servlet spec. 2.4 
+	<locale-encoding-mapping-list>
+		<locale-encoding-mapping>
+			<locale>de</locale>
+			<encoding>UTF-8</encoding>
+		</locale-encoding-mapping>
+	</locale-encoding-mapping-list>
+	-->	  
+  
+<!--  
+      There are three means to configure Wickets configuration mode and they are
+      tested in the order given. 
+      1) A system property: -Dwicket.configuration
+      2) servlet specific <init-param>
+      3) context specific <context-param>
+      The value might be either "development" (reloading when templates change)
+      or "deployment". If no configuration is found, "deployment" is the default.
+-->
+	<context-param>
+		<param-name>configuration</param-name>
+		<param-value>deployment</param-value>
+	</context-param>
+
+
+	<filter>
+		<filter-name>TestNGApplication</filter-name>
+		<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
+		<init-param>
+            <param-name>applicationClassName</param-name>
+            <param-value>org.apache.wicket.ngwebapp.NGApplication</param-value>
+		</init-param>		
+	</filter>
+
+	<!-- couple the session filter to the helloworld servlet -->
+	<filter-mapping>
+		<filter-name>TestNGApplication</filter-name>
+		<url-pattern>/wng/*</url-pattern>
+        <dispatcher>REQUEST</dispatcher>
+        <dispatcher>INCLUDE</dispatcher>
+	</filter-mapping>
+
+	<session-config>
+		<session-timeout>5</session-timeout>
+	</session-config>
+	
+	<welcome-file-list>
+	<welcome-file>index.html</welcome-file>
+	</welcome-file-list>
+
+</web-app>

Propchange: wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/test/java/org/apache/wicket/ngwebapp/StartExamples.java
URL: http://svn.apache.org/viewvc/wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/test/java/org/apache/wicket/ngwebapp/StartExamples.java?rev=759530&view=auto
==============================================================================
--- wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/test/java/org/apache/wicket/ngwebapp/StartExamples.java (added)
+++ wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/test/java/org/apache/wicket/ngwebapp/StartExamples.java Sat Mar 28 17:59:32 2009
@@ -0,0 +1,68 @@
+/*
+ * 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.ngwebapp;
+import java.lang.management.ManagementFactory;
+
+import javax.management.MBeanServer;
+
+import org.mortbay.jetty.Server;
+import org.mortbay.jetty.webapp.WebAppContext;
+import org.mortbay.management.MBeanContainer;
+
+/**
+ * Seperate startup class for people that want to run the examples directly. Use parameter
+ * -Dcom.sun.management.jmxremote to startup JMX (and e.g. connect with jconsole).
+ */
+public class StartExamples
+{
+	/**
+
+	/**
+	 * Main function, starts the jetty server.
+	 * 
+	 * @param args
+	 */
+	public static void main(String[] args)
+	{
+		Server server = new Server(8080);
+		new WebAppContext(server, "src/main/webapp", "/wicket-examples");
+
+		MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
+		MBeanContainer mBeanContainer = new MBeanContainer(mBeanServer);
+		server.getContainer().addEventListener(mBeanContainer);
+		mBeanContainer.start();
+
+		try
+		{
+			server.start();
+			server.join();
+		}
+		catch (Exception e)
+		{
+			e.printStackTrace();
+			System.exit(100);
+		}
+	}
+
+	/**
+	 * Construct.
+	 */
+	StartExamples()
+	{
+		super();
+	}
+}

Propchange: wicket/sandbox/knopp/experimental/wicket-ng-webapp/src/test/java/org/apache/wicket/ngwebapp/StartExamples.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain