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/10/05 05:34:10 UTC
svn commit: r582068 - in /wicket/trunk/jdk-1.5/wicket-examples/src/main:
java/org/apache/wicket/examples/helloworld/
java/org/apache/wicket/examples/pub2/ webapp/ webapp/WEB-INF/
Author: ehillenius
Date: Thu Oct 4 20:34:08 2007
New Revision: 582068
URL: http://svn.apache.org/viewvc?rev=582068&view=rev
Log:
added an alternative implementation of the pub example that shows a nicer way to localize your apps
Added:
wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/
wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Beer.gif (with props)
wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Beer_da_DK.gif (with props)
wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Beer_de_DE.gif (with props)
wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Beer_en_CA.gif (with props)
wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Beer_nl_NL.gif (with props)
wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Beer_zh_CN.gif (with props)
wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home.html
wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home.java
wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home.properties
wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home_da_DK.properties
wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home_de_DE.properties
wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home_en_CA.properties
wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home_nl_NL.properties
wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home_zh_CN.xml
wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/PubApplication.java
Modified:
wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/helloworld/HelloWorldApplication.java
wicket/trunk/jdk-1.5/wicket-examples/src/main/webapp/WEB-INF/web.xml
wicket/trunk/jdk-1.5/wicket-examples/src/main/webapp/index.html
Modified: wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/helloworld/HelloWorldApplication.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/helloworld/HelloWorldApplication.java?rev=582068&r1=582067&r2=582068&view=diff
==============================================================================
--- wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/helloworld/HelloWorldApplication.java (original)
+++ wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/helloworld/HelloWorldApplication.java Thu Oct 4 20:34:08 2007
@@ -16,7 +16,12 @@
*/
package org.apache.wicket.examples.helloworld;
+import org.apache.wicket.Request;
+import org.apache.wicket.RequestCycle;
+import org.apache.wicket.Response;
import org.apache.wicket.examples.WicketExampleApplication;
+import org.apache.wicket.protocol.http.WebRequest;
+import org.apache.wicket.protocol.http.WebRequestCycle;
/**
* Application class for hello world example.
@@ -31,6 +36,29 @@
public HelloWorldApplication()
{
+ }
+
+ /**
+ * @see org.apache.wicket.protocol.http.WebApplication#newRequestCycle(org.apache.wicket.Request,
+ * org.apache.wicket.Response)
+ */
+ @Override
+ public RequestCycle newRequestCycle(Request request, Response response)
+ {
+ return new WebRequestCycle(this, (WebRequest)request, response)
+ {
+ @Override
+ protected void onBeginRequest()
+ {
+ // open session
+ }
+
+ @Override
+ protected void onEndRequest()
+ {
+ // close session
+ }
+ };
}
/**
Added: wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Beer.gif
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Beer.gif?rev=582068&view=auto
==============================================================================
Binary file - no diff available.
Propchange: wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Beer.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Beer_da_DK.gif
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Beer_da_DK.gif?rev=582068&view=auto
==============================================================================
Binary file - no diff available.
Propchange: wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Beer_da_DK.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Beer_de_DE.gif
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Beer_de_DE.gif?rev=582068&view=auto
==============================================================================
Binary file - no diff available.
Propchange: wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Beer_de_DE.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Beer_en_CA.gif
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Beer_en_CA.gif?rev=582068&view=auto
==============================================================================
Binary file - no diff available.
Propchange: wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Beer_en_CA.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Beer_nl_NL.gif
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Beer_nl_NL.gif?rev=582068&view=auto
==============================================================================
Binary file - no diff available.
Propchange: wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Beer_nl_NL.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Beer_zh_CN.gif
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Beer_zh_CN.gif?rev=582068&view=auto
==============================================================================
Binary file - no diff available.
Propchange: wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Beer_zh_CN.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home.html
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home.html?rev=582068&view=auto
==============================================================================
--- wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home.html (added)
+++ wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home.html Thu Oct 4 20:34:08 2007
@@ -0,0 +1,28 @@
+<html xmlns:wicket="http://wicket.apache.org/">
+<head>
+ <title>Wicket Examples - pub</title>
+ <link rel="stylesheet" type="text/css" href="style.css"/>
+</head>
+<body>
+ <span wicket:id="mainNavigation"></span>
+ <span wicket:id="salutation">Salutation</span>
+ <p>
+ <wicket:message key="salespitch">
+ Does this beer rock?
+ </wicket:message>
+ </p>
+ <p>
+ <wicket:link><!-- the autolink will try to match the image with a package resource -->
+ <img src="Beer.gif"/>
+ </wicket:link>
+ </p>
+ <p>
+ <a href="#" wicket:id="goCanadian">[go Canadian]</a>
+ <a href="#" wicket:id="goUS">[go US]</a>
+ <a href="#" wicket:id="goDutch">[go Dutch]</a>
+ <a href="#" wicket:id="goGerman">[go German]</a>
+ <a href="#" wicket:id="goChinese">[go Chinese]</a>
+ <a href="#" wicket:id="goDanish">[go Danish]</a>
+ </p>
+</body>
+</html>
Added: wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home.java?rev=582068&view=auto
==============================================================================
--- wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home.java (added)
+++ wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home.java Thu Oct 4 20:34:08 2007
@@ -0,0 +1,107 @@
+/*
+ * 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.pub2;
+
+import java.util.Locale;
+
+import org.apache.wicket.PageParameters;
+import org.apache.wicket.examples.WicketExamplePage;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.StringResourceModel;
+import org.apache.wicket.util.value.ValueMap;
+
+
+/**
+ * Demonstrates localization.
+ *
+ * @author Jonathan Locke
+ * @author Eelco Hillenius
+ */
+public final class Home extends WicketExamplePage
+{
+ /**
+ * Constructor
+ *
+ * @param parameters
+ * Page parameters (ignored since this is the home page)
+ */
+ public Home(final PageParameters parameters)
+ {
+ // create a dummy object to serve as our substitution model
+ ValueMap map = new ValueMap();
+ map.put("user", "Jonathan");
+
+ // Here, we create a model that knows how to get localized strings.
+ // It uses the page's resource (Home_cc_LC.properties) and gets the
+ // text with resource key 'salution'. For the US, this is:
+ // salutation=${user}, dude!
+ // variable ${user} will be regconized as a property variable, and will
+ // be substituted with the given model (the wrapped map). Hence,
+ // ${user} will be replaced by map.get('user'), which is 'Jonathan'.
+ StringResourceModel labelModel = new StringResourceModel("salutation", this, new Model(map));
+
+ // Add the label with the dynamic model
+ add(new Label("salutation", labelModel));
+
+ // Add a couple of links to be able to play around with the session
+ // locale
+ add(new Link("goCanadian")
+ {
+ public void onClick()
+ {
+ getSession().setLocale(Locale.CANADA);
+ }
+ });
+ add(new Link("goUS")
+ {
+ public void onClick()
+ {
+ getSession().setLocale(Locale.US);
+ }
+ });
+ add(new Link("goDutch")
+ {
+ public void onClick()
+ {
+ getSession().setLocale(new Locale("nl", "NL"));
+ }
+ });
+ add(new Link("goGerman")
+ {
+ public void onClick()
+ {
+ getSession().setLocale(new Locale("de", "DE"));
+ }
+ });
+ add(new Link("goChinese")
+ {
+ public void onClick()
+ {
+ getSession().setLocale(new Locale("zh", "CN"));
+ }
+ });
+ add(new Link("goDanish")
+ {
+ public void onClick()
+ {
+ getSession().setLocale(new Locale("da", "DK"));
+ }
+ });
+ }
+}
Added: wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home.properties
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home.properties?rev=582068&view=auto
==============================================================================
--- wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home.properties (added)
+++ wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home.properties Thu Oct 4 20:34:08 2007
@@ -0,0 +1,16 @@
+# 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.
+salutation=${user}, dude!
+salespitch=This is tooootally the best beer you can get for under a buck.
Added: wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home_da_DK.properties
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home_da_DK.properties?rev=582068&view=auto
==============================================================================
--- wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home_da_DK.properties (added)
+++ wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home_da_DK.properties Thu Oct 4 20:34:08 2007
@@ -0,0 +1,16 @@
+# 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.
+salutation=Hey ${user}! Jeg har en super øl som du skal smage!
+salespitch=En rigtig god øl fra en af de gode danske mikrobryggerier.
Added: wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home_de_DE.properties
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home_de_DE.properties?rev=582068&view=auto
==============================================================================
--- wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home_de_DE.properties (added)
+++ wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home_de_DE.properties Thu Oct 4 20:34:08 2007
@@ -0,0 +1,16 @@
+# 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.
+salutation=Echt klasse. Solltest du auch mal probieren, ${user}!
+salespitch=Etwas ganz besonderes aus der Region
\ No newline at end of file
Added: wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home_en_CA.properties
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home_en_CA.properties?rev=582068&view=auto
==============================================================================
--- wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home_en_CA.properties (added)
+++ wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home_en_CA.properties Thu Oct 4 20:34:08 2007
@@ -0,0 +1,16 @@
+# 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.
+salutation=Welcome to the Great White North, ${user}!
+salespitch=Super beer for a Looney, eh?
\ No newline at end of file
Added: wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home_nl_NL.properties
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home_nl_NL.properties?rev=582068&view=auto
==============================================================================
--- wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home_nl_NL.properties (added)
+++ wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home_nl_NL.properties Thu Oct 4 20:34:08 2007
@@ -0,0 +1,16 @@
+# 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.
+salutation=He ${user}! Zin in 'n biertje?
+salespitch=Goed bier uut t oosten.
\ No newline at end of file
Added: wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home_zh_CN.xml
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home_zh_CN.xml?rev=582068&view=auto
==============================================================================
--- wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home_zh_CN.xml (added)
+++ wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/Home_zh_CN.xml Thu Oct 4 20:34:08 2007
@@ -0,0 +1,22 @@
+<?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.
+-->
+<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
+<properties>
+ <entry key="salutation">欢è¿æ¥å°ä¸æWicketçæ¼ç¤º, ${user}!</entry>
+ <entry key="salespitch">æ¨çæä½³éæ©</entry>
+</properties>
Added: wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/PubApplication.java
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/PubApplication.java?rev=582068&view=auto
==============================================================================
--- wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/PubApplication.java (added)
+++ wicket/trunk/jdk-1.5/wicket-examples/src/main/java/org/apache/wicket/examples/pub2/PubApplication.java Thu Oct 4 20:34:08 2007
@@ -0,0 +1,43 @@
+/*
+ * 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.pub2;
+
+import org.apache.wicket.examples.WicketExampleApplication;
+
+/**
+ * Application class for the linkomatic example.
+ *
+ * @author Jonathan Locke
+ */
+public class PubApplication extends WicketExampleApplication
+{
+ /**
+ * Constructor
+ */
+ public PubApplication()
+ {
+ }
+
+ /**
+ * @see org.apache.wicket.Application#getHomePage()
+ */
+ public Class getHomePage()
+ {
+ return Home.class;
+ }
+
+}
Modified: wicket/trunk/jdk-1.5/wicket-examples/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.5/wicket-examples/src/main/webapp/WEB-INF/web.xml?rev=582068&r1=582067&r2=582068&view=diff
==============================================================================
--- wicket/trunk/jdk-1.5/wicket-examples/src/main/webapp/WEB-INF/web.xml (original)
+++ wicket/trunk/jdk-1.5/wicket-examples/src/main/webapp/WEB-INF/web.xml Thu Oct 4 20:34:08 2007
@@ -208,6 +208,15 @@
</filter>
<filter>
+ <filter-name>PubApplication2</filter-name>
+ <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
+ <init-param>
+ <param-name>applicationClassName</param-name>
+ <param-value>org.apache.wicket.examples.pub2.PubApplication</param-value>
+ </init-param>
+ </filter>
+
+ <filter>
<filter-name>SignInApplication</filter-name>
<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
<init-param>
@@ -490,6 +499,13 @@
<filter-mapping>
<filter-name>PubApplication</filter-name>
<url-pattern>/pub/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>PubApplication2</filter-name>
+ <url-pattern>/pub2/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
Modified: wicket/trunk/jdk-1.5/wicket-examples/src/main/webapp/index.html
URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.5/wicket-examples/src/main/webapp/index.html?rev=582068&r1=582067&r2=582068&view=diff
==============================================================================
--- wicket/trunk/jdk-1.5/wicket-examples/src/main/webapp/index.html (original)
+++ wicket/trunk/jdk-1.5/wicket-examples/src/main/webapp/index.html Thu Oct 4 20:34:08 2007
@@ -22,6 +22,7 @@
<tr><td align="right"><a href="linkomatic">linkomatic</a></td><td> - Different kinds of links.</td></tr>
<tr><td align="right"><a href="navomatic">navomatic</a></td><td> - Page navigation.</td></tr>
<tr><td align="right"><a href="pub">pub</a></td><td> - Localization.</td></tr>
+ <tr><td align="right"><a href="pub2">pub2</a></td><td> - Alternative localization.</td></tr>
<tr><td align="right"><a href="unicodeconverter">unicode converter</a></td><td> - Converts input using some model magic.</td></tr>
<tr><td align="right"><a href="niceurl">niceurl</a></td><td> - Demonstrates the use of "nice" URLs.</td></tr>
<tr><td align="right"><a href="ajax">ajax</a></td><td> - Examples using wicket's built-in AJAX.</td></tr>