Author: jdonnerstag
Date: Sun Aug 24 00:23:52 2008
New Revision: 688457

URL: http://svn.apache.org/viewvc?rev=688457&view=rev
Log:
wicket-1796: allow for other file extension for xml properties files to avoid 
conflicts with XML markup files

Added:
    
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlBasePage.java
    
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlBasePage.xmlProperties
    
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageExpectedResult_1.xml
    
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageExpectedResult_2.xml
    
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageExpectedResult_3.xml
    
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageTest.java
    
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_1.java
    
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_1.xml
    
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_2.java
    
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_2.xml
    
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_3.java
    
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_3.xml
    
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_3.xmlProperties
Modified:
    wicket/trunk/wicket/src/main/java/org/apache/wicket/Localizer.java
    
wicket/trunk/wicket/src/main/java/org/apache/wicket/resource/PropertiesFactory.java

Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/Localizer.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/Localizer.java?rev=688457&r1=688456&r2=688457&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/Localizer.java 
(original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/Localizer.java Sun Aug 
24 00:23:52 2008
@@ -60,6 +60,7 @@
        /** Cache properties */
        private Map<String, String> cache = newCache();
 
+       /** */
        private final ClassMetaDatabase metaDatabase = new ClassMetaDatabase();
 
        /**
@@ -130,8 +131,8 @@
         * @throws MissingResourceException
         *             If resource not found and configuration dictates that 
exception should be thrown
         */
-       public String getString(final String key, final Component component,
-               final String defaultValue) throws MissingResourceException
+       public String getString(final String key, final Component component, 
final String defaultValue)
+               throws MissingResourceException
        {
                return getString(key, component, null, defaultValue);
        }
@@ -257,8 +258,8 @@
 
                if (resourceSettings.getThrowExceptionOnMissingResource())
                {
-                       AppendingStringBuffer message = new 
AppendingStringBuffer("Unable to find resource: " +
-                               key);
+                       AppendingStringBuffer message = new 
AppendingStringBuffer("Unable to find property: '" +
+                               key + "'");
                        if (component != null)
                        {
                                message.append(" for component: ");
@@ -269,7 +270,7 @@
                                ? component.getClass().getName() : ""), key);
                }
 
-               return "[Warning: String resource for '" + key + "' not found]";
+               return "[Warning: Property for '" + key + "' not found]";
        }
 
        /**
@@ -281,7 +282,9 @@
        protected void putIntoCache(final String cacheKey, final String string)
        {
                if (cache == null)
+               {
                        return;
+               }
 
                // ConcurrentHashMap does not allow null values
                if (string == null)

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/resource/PropertiesFactory.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/resource/PropertiesFactory.java?rev=688457&r1=688456&r2=688457&view=diff
==============================================================================
--- 
wicket/trunk/wicket/src/main/java/org/apache/wicket/resource/PropertiesFactory.java
 (original)
+++ 
wicket/trunk/wicket/src/main/java/org/apache/wicket/resource/PropertiesFactory.java
 Sun Aug 24 00:23:52 2008
@@ -53,9 +53,7 @@
        /** Log. */
        private static final Logger log = 
LoggerFactory.getLogger(PropertiesFactory.class);
 
-       /**
-        * Listeners will be invoked after changes to property file have been 
detected
-        */
+       /** Listeners will be invoked after changes to property file have been 
detected */
        private final List<IPropertiesChangeListener> afterReloadListeners = 
new ArrayList<IPropertiesChangeListener>();
 
        /** Cache for all property files loaded */
@@ -64,7 +62,7 @@
        /** Application */
        private final Application application;
 
-       /** LIst of Properties Loader */
+       /** List of Properties Loader */
        private final List<IPropertiesLoader> propertiesLoader;
 
        /**
@@ -79,7 +77,7 @@
 
                propertiesLoader = new ArrayList<IPropertiesLoader>();
                propertiesLoader.add(new PropertiesFilePropertiesLoader());
-               propertiesLoader.add(new XmlFilePropertiesLoader());
+               propertiesLoader.add(new XmlFilePropertiesLoader("xml"));
        }
 
        /**
@@ -174,7 +172,7 @@
                 * 
                 * @param clazz
                 * @param path
-                * @return
+                * @return Properties
                 */
                Properties load(final Class<?> clazz, final String path);
        }
@@ -193,14 +191,14 @@
 
                /**
                 * 
-                * @return
+                * @return File extension
                 */
                abstract protected String getFileExtension();
 
                /**
                 * 
                 * @param in
-                * @return
+                * @return java.util.Properties
                 * @throws IOException
                 */
                abstract protected java.util.Properties 
loadProperties(BufferedInputStream in)
@@ -334,7 +332,7 @@
                /**
                 * 
                 * @param in
-                * @return
+                * @return java.util.Properties
                 * @throws IOException
                 */
                @Override
@@ -351,11 +349,16 @@
         */
        public class XmlFilePropertiesLoader extends AbstractPropertiesLoader
        {
+               private final String fileExtension;
+
                /**
                 * Construct.
+                * 
+                * @param fileExtension
                 */
-               public XmlFilePropertiesLoader()
+               public XmlFilePropertiesLoader(final String fileExtension)
                {
+                       this.fileExtension = fileExtension;
                }
 
                /**
@@ -365,13 +368,13 @@
                @Override
                protected String getFileExtension()
                {
-                       return "xml";
+                       return fileExtension;
                }
 
                /**
                 * 
                 * @param in
-                * @return
+                * @return java.util.Properties
                 * @throws IOException
                 */
                @Override

Added: 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlBasePage.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlBasePage.java?rev=688457&view=auto
==============================================================================
--- 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlBasePage.java
 (added)
+++ 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlBasePage.java
 Sun Aug 24 00:23:52 2008
@@ -0,0 +1,46 @@
+/*
+ * 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.markup.html.basic;
+
+import org.apache.wicket.markup.html.WebPage;
+
+
+/**
+ * Mock page for testing.
+ * 
+ * @author Juergen Donnerstag
+ */
+public class XmlBasePage extends WebPage
+{
+       private static final long serialVersionUID = 1L;
+
+       /**
+        * Construct.
+        */
+       public XmlBasePage()
+       {
+       }
+
+       /**
+        * @see org.apache.wicket.markup.html.WebPage#getMarkupType()
+        */
+       @Override
+       public String getMarkupType()
+       {
+               return "xml";
+       }
+}

Added: 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlBasePage.xmlProperties
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlBasePage.xmlProperties?rev=688457&view=auto
==============================================================================
--- 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlBasePage.xmlProperties
 (added)
+++ 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlBasePage.xmlProperties
 Sun Aug 24 00:23:52 2008
@@ -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="test">value</entry>
+       <entry key="wicket">cool</entry>
+</properties>

Added: 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageExpectedResult_1.xml
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageExpectedResult_1.xml?rev=688457&view=auto
==============================================================================
--- 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageExpectedResult_1.xml
 (added)
+++ 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageExpectedResult_1.xml
 Sun Aug 24 00:23:52 2008
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    ====================================================================
+    Licensed 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.
+-->
+<root>
+  <order>
+     <item>
+     </item>
+  </order>
+</root>

Added: 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageExpectedResult_2.xml
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageExpectedResult_2.xml?rev=688457&view=auto
==============================================================================
--- 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageExpectedResult_2.xml
 (added)
+++ 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageExpectedResult_2.xml
 Sun Aug 24 00:23:52 2008
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    ====================================================================
+    Licensed 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.
+-->
+<root>
+  <order>
+     <item>
+     </item>
+  </order>
+</root>

Added: 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageExpectedResult_3.xml
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageExpectedResult_3.xml?rev=688457&view=auto
==============================================================================
--- 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageExpectedResult_3.xml
 (added)
+++ 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageExpectedResult_3.xml
 Sun Aug 24 00:23:52 2008
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    ====================================================================
+    Licensed 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.
+-->
+<root>
+  <order>
+     <item>
+     </item>
+  </order>
+</root>

Added: 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageTest.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageTest.java?rev=688457&view=auto
==============================================================================
--- 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageTest.java
 (added)
+++ 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPageTest.java
 Sun Aug 24 00:23:52 2008
@@ -0,0 +1,95 @@
+/*
+ * 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.markup.html.basic;
+
+import org.apache.wicket.Application;
+import org.apache.wicket.WicketTestCase;
+import org.apache.wicket.resource.IPropertiesFactory;
+import org.apache.wicket.resource.PropertiesFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * 
+ * @author Juergen Donnerstag
+ */
+public class XmlPageTest extends WicketTestCase
+{
+       private static final Logger log = 
LoggerFactory.getLogger(XmlPageTest.class);
+
+       /**
+        * Create the test.
+        * 
+        * @param name
+        *            The test name
+        */
+       public XmlPageTest(String name)
+       {
+               super(name);
+       }
+
+       /**
+        * @throws Exception
+        */
+       public void testRenderHomePage_1() throws Exception
+       {
+               executeTest(XmlPage_1.class, "XmlPageExpectedResult_1.xml");
+       }
+
+       /**
+        * @throws Exception
+        */
+       public void testRenderHomePage_2() throws Exception
+       {
+               IPropertiesFactory myFac = new 
MyPropertiesFactory(tester.getApplication());
+               
tester.getApplication().getResourceSettings().setPropertiesFactory(myFac);
+
+               executeTest(XmlPage_2.class, "XmlPageExpectedResult_2.xml");
+       }
+
+       /**
+        * @throws Exception
+        */
+       public void testRenderHomePage_3() throws Exception
+       {
+               IPropertiesFactory myFac = new 
MyPropertiesFactory(tester.getApplication());
+               
tester.getApplication().getResourceSettings().setPropertiesFactory(myFac);
+
+               executeTest(XmlPage_3.class, "XmlPageExpectedResult_3.xml");
+       }
+
+       /**
+        * 
+        */
+       private class MyPropertiesFactory extends PropertiesFactory
+       {
+               /**
+                * Construct.
+                * 
+                * @param application
+                */
+               public MyPropertiesFactory(Application application)
+               {
+                       super(application);
+
+                       getPropertiesLoaders().clear();
+                       getPropertiesLoaders().add(new 
PropertiesFilePropertiesLoader());
+                       getPropertiesLoaders().add(new 
XmlFilePropertiesLoader("xmlProperties"));
+               }
+       }
+}

Added: 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_1.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_1.java?rev=688457&view=auto
==============================================================================
--- 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_1.java
 (added)
+++ 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_1.java
 Sun Aug 24 00:23:52 2008
@@ -0,0 +1,46 @@
+/*
+ * 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.markup.html.basic;
+
+import org.apache.wicket.markup.html.WebPage;
+
+
+/**
+ * Mock page for testing.
+ * 
+ * @author Juergen Donnerstag
+ */
+public class XmlPage_1 extends WebPage
+{
+       private static final long serialVersionUID = 1L;
+
+       /**
+        * Construct.
+        */
+       public XmlPage_1()
+       {
+       }
+
+       /**
+        * @see org.apache.wicket.markup.html.WebPage#getMarkupType()
+        */
+       @Override
+       public String getMarkupType()
+       {
+               return "xml";
+       }
+}

Added: 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_1.xml
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_1.xml?rev=688457&view=auto
==============================================================================
--- 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_1.xml
 (added)
+++ 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_1.xml
 Sun Aug 24 00:23:52 2008
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    ====================================================================
+    Licensed 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.
+-->
+<root>
+  <order>
+     <item>
+     </item>
+  </order>
+</root>

Added: 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_2.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_2.java?rev=688457&view=auto
==============================================================================
--- 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_2.java
 (added)
+++ 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_2.java
 Sun Aug 24 00:23:52 2008
@@ -0,0 +1,39 @@
+/*
+ * 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.markup.html.basic;
+
+
+/**
+ * Mock page for testing.
+ * 
+ * @author Juergen Donnerstag
+ */
+public class XmlPage_2 extends XmlBasePage
+{
+       private static final long serialVersionUID = 1L;
+
+       /**
+        * Construct.
+        */
+       public XmlPage_2()
+       {
+               if (getString("test").equals("value") == false)
+               {
+                       throw new RuntimeException("Expected 'test'");
+               }
+       }
+}

Added: 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_2.xml
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_2.xml?rev=688457&view=auto
==============================================================================
--- 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_2.xml
 (added)
+++ 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_2.xml
 Sun Aug 24 00:23:52 2008
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    ====================================================================
+    Licensed 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.
+-->
+<root>
+  <order>
+     <item>
+     </item>
+  </order>
+</root>

Added: 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_3.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_3.java?rev=688457&view=auto
==============================================================================
--- 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_3.java
 (added)
+++ 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_3.java
 Sun Aug 24 00:23:52 2008
@@ -0,0 +1,50 @@
+/*
+ * 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.markup.html.basic;
+
+import org.apache.wicket.markup.html.WebPage;
+
+
+/**
+ * Mock page for testing.
+ * 
+ * @author Juergen Donnerstag
+ */
+public class XmlPage_3 extends WebPage
+{
+       private static final long serialVersionUID = 1L;
+
+       /**
+        * Construct.
+        */
+       public XmlPage_3()
+       {
+               if (getString("test").equals("value") == false)
+               {
+                       throw new RuntimeException("Expected 'test'");
+               }
+       }
+
+       /**
+        * @see org.apache.wicket.markup.html.WebPage#getMarkupType()
+        */
+       @Override
+       public String getMarkupType()
+       {
+               return "xml";
+       }
+}

Added: 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_3.xml
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_3.xml?rev=688457&view=auto
==============================================================================
--- 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_3.xml
 (added)
+++ 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_3.xml
 Sun Aug 24 00:23:52 2008
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    ====================================================================
+    Licensed 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.
+-->
+<root>
+  <order>
+     <item>
+     </item>
+  </order>
+</root>

Added: 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_3.xmlProperties
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_3.xmlProperties?rev=688457&view=auto
==============================================================================
--- 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_3.xmlProperties
 (added)
+++ 
wicket/trunk/wicket/src/test/java/org/apache/wicket/markup/html/basic/XmlPage_3.xmlProperties
 Sun Aug 24 00:23:52 2008
@@ -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="test">value</entry>
+       <entry key="wicket">cool</entry>
+</properties>


Reply via email to