Author: jdonnerstag
Date: Wed Jun 22 20:20:21 2011
New Revision: 1138614

URL: http://svn.apache.org/viewvc?rev=1138614&view=rev
Log:
WICKET-3815
fixed: LinkType inner class is duplicated

Added:
    
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/tree/LinkType.java
Modified:
    
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/tree/BaseTree.java
    
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/nested/Home.java
    
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tree/DefaultAbstractTree.java

Modified: 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/tree/BaseTree.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/tree/BaseTree.java?rev=1138614&r1=1138613&r2=1138614&view=diff
==============================================================================
--- 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/tree/BaseTree.java
 (original)
+++ 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/tree/BaseTree.java
 Wed Jun 22 20:20:21 2011
@@ -34,7 +34,6 @@ import org.apache.wicket.model.IModel;
 import org.apache.wicket.request.Response;
 import org.apache.wicket.request.resource.PackageResourceReference;
 import org.apache.wicket.request.resource.ResourceReference;
-import org.apache.wicket.util.lang.EnumeratedType;
 import org.apache.wicket.util.string.Strings;
 
 /**
@@ -351,49 +350,6 @@ public abstract class BaseTree extends A
        }
 
        /**
-        * The type of junction links and node selection links.
-        * <dl>
-        * <dt>Regular link</dt>
-        * <dd>Non-ajax link, always refreshes the whole page. Works with 
javascript disabled.</dd>
-        * <dt>Ajax link</dt>
-        * <dd>Links that supports partial updates. Doesn't work with 
javascript disabled</dd>
-        * <dt>Ajax fallback link</dt>
-        * <dd>Link that supports partial updates. With javascript disabled 
acts like regular link. The
-        * drawback is that generated url (thus the entire html) is larger then 
using the other two</dd>
-        * </dl>
-        */
-       public static final class LinkType extends EnumeratedType
-       {
-
-               /** partial updates with no fallback. */
-               public static final LinkType AJAX = new LinkType("AJAX");
-
-               /**
-                * partial updates that falls back to a regular link in case 
the client does not support
-                * javascript.
-                */
-               public static final LinkType AJAX_FALLBACK = new 
LinkType("AJAX_FALLBACK");
-
-               /**
-                * non-ajax version that always re-renders the whole page.
-                */
-               public static final LinkType REGULAR = new LinkType("REGULAR");
-
-               private static final long serialVersionUID = 1L;
-
-               /**
-                * Construct.
-                * 
-                * @param name
-                *            the name of the type of the link
-                */
-               public LinkType(String name)
-               {
-                       super(name);
-               }
-       }
-
-       /**
         * Helper class for calling an action from a link.
         * 
         * @author Matej Knopp

Added: 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/tree/LinkType.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/tree/LinkType.java?rev=1138614&view=auto
==============================================================================
--- 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/tree/LinkType.java
 (added)
+++ 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/html/tree/LinkType.java
 Wed Jun 22 20:20:21 2011
@@ -0,0 +1,62 @@
+/*
+ * 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.tree;
+
+import org.apache.wicket.util.lang.EnumeratedType;
+
+/**
+ * The type of junction links and node selection links.
+ * <dl>
+ * <dt>Regular link</dt>
+ * <dd>Non-ajax link, always refreshes the whole page. Works with javascript 
disabled.</dd>
+ * <dt>Ajax link</dt>
+ * <dd>Links that supports partial updates. Doesn't work with javascript 
disabled</dd>
+ * <dt>Ajax fallback link</dt>
+ * <dd>Link that supports partial updates. With javascript disabled acts like 
regular link. The
+ * drawback is that generated url (thus the entire html) is larger then using 
the other two</dd>
+ * </dl>
+ */
+public final class LinkType extends EnumeratedType
+{
+
+       /** partial updates with no fallback. */
+       public static final LinkType AJAX = new LinkType("AJAX");
+
+       /**
+        * partial updates that falls back to a regular link in case the client 
does not support
+        * javascript.
+        */
+       public static final LinkType AJAX_FALLBACK = new 
LinkType("AJAX_FALLBACK");
+
+       /**
+        * non-ajax version that always re-renders the whole page.
+        */
+       public static final LinkType REGULAR = new LinkType("REGULAR");
+
+       private static final long serialVersionUID = 1L;
+
+       /**
+        * Construct.
+        * 
+        * @param name
+        *            the name of the type of the link
+        */
+       public LinkType(String name)
+       {
+               super(name);
+       }
+}
\ No newline at end of file

Modified: 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/nested/Home.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/nested/Home.java?rev=1138614&r1=1138613&r2=1138614&view=diff
==============================================================================
--- 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/nested/Home.java
 (original)
+++ 
wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/nested/Home.java
 Wed Jun 22 20:20:21 2011
@@ -17,7 +17,6 @@
 package org.apache.wicket.examples.nested;
 
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
 
 import javax.swing.tree.DefaultMutableTreeNode;
@@ -28,9 +27,9 @@ import javax.swing.tree.TreeNode;
 import org.apache.wicket.examples.WicketExamplePage;
 import org.apache.wicket.examples.ajax.builtin.tree.SimpleTreePage;
 import org.apache.wicket.extensions.markup.html.tree.Tree;
-import 
org.apache.wicket.extensions.markup.html.tree.DefaultAbstractTree.LinkType;
 import org.apache.wicket.markup.html.link.BookmarkablePageLink;
 import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.markup.html.tree.LinkType;
 import org.apache.wicket.request.mapper.parameter.PageParameters;
 
 
@@ -123,7 +122,7 @@ public class Home extends WicketExampleP
                        {
                                DefaultMutableTreeNode child = new 
DefaultMutableTreeNode(obj);
                                parent.add(child);
-                               add(child, (List<Object>) obj);
+                               add(child, (List<Object>)obj);
                        }
                        else
                        {

Modified: 
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tree/DefaultAbstractTree.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tree/DefaultAbstractTree.java?rev=1138614&r1=1138613&r2=1138614&view=diff
==============================================================================
--- 
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tree/DefaultAbstractTree.java
 (original)
+++ 
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tree/DefaultAbstractTree.java
 Wed Jun 22 20:20:21 2011
@@ -32,6 +32,7 @@ import org.apache.wicket.markup.html.IHe
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.link.Link;
 import org.apache.wicket.markup.html.tree.AbstractTree;
+import org.apache.wicket.markup.html.tree.LinkType;
 import org.apache.wicket.markup.html.tree.WicketTreeModel;
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.request.IRequestHandler;
@@ -40,7 +41,6 @@ import org.apache.wicket.request.cycle.R
 import 
org.apache.wicket.request.handler.resource.ResourceReferenceRequestHandler;
 import org.apache.wicket.request.resource.PackageResourceReference;
 import org.apache.wicket.request.resource.ResourceReference;
-import org.apache.wicket.util.lang.EnumeratedType;
 
 /**
  * Tree class that contains convenient functions related to presentation of 
the tree, which includes
@@ -61,47 +61,6 @@ public abstract class DefaultAbstractTre
        private static final long serialVersionUID = 1L;
 
        /**
-        * The type of junction links and node selection links.
-        * <dl>
-        * <dt>Regular link</dt>
-        * <dd>Non-ajax link, always refreshes the whole page. Works with 
javascript disabled.</dd>
-        * <dt>Ajax link</dt>
-        * <dd>Links that supports partial updates. Doesn't work with 
javascript disabled</dd>
-        * <dt>Ajax fallback link</dt>
-        * <dd>Link that supports partial updates. With javascript disabled 
acts like regular link. The
-        * drawback is that generated url (thus the entire html) is larger then 
using the other two</dd>
-        * </dl>
-        */
-       public static final class LinkType extends EnumeratedType
-       {
-               /** partial updates with no fallback. */
-               public static final LinkType AJAX = new LinkType("AJAX");
-
-               /**
-                * partial updates that falls back to a regular link in case 
the client does not support
-                * javascript.
-                */
-               public static final LinkType AJAX_FALLBACK = new 
LinkType("AJAX_FALLBACK");
-
-               /**
-                * non-ajax version that always re-renders the whole page.
-                */
-               public static final LinkType REGULAR = new LinkType("REGULAR");
-
-               private static final long serialVersionUID = 1L;
-
-               /**
-                * Construct.
-                * 
-                * @param name
-                */
-               public LinkType(final String name)
-               {
-                       super(name);
-               }
-       }
-
-       /**
         * Helper class for calling an action from a link.
         * 
         * @author Matej Knopp


Reply via email to