Author: ivaynberg
Date: Mon Mar 15 16:38:35 2010
New Revision: 923333

URL: http://svn.apache.org/viewvc?rev=923333&view=rev
Log:
added behavior.unbind. more consistent mapping for 
webapp#getrootmapperascompound()

Removed:
    
wicket/trunk/wicket-examples/src/test/java/org/apache/wicket/examples/AllTests.java
Modified:
    
wicket/trunk/wicket-examples/src/test/java/org/apache/wicket/filtertest/Application.java
    wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java
    
wicket/trunk/wicket/src/main/java/org/apache/wicket/behavior/AbstractBehavior.java
    wicket/trunk/wicket/src/main/java/org/apache/wicket/behavior/IBehavior.java
    
wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WebApplication.java

Modified: 
wicket/trunk/wicket-examples/src/test/java/org/apache/wicket/filtertest/Application.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/test/java/org/apache/wicket/filtertest/Application.java?rev=923333&r1=923332&r2=923333&view=diff
==============================================================================
--- 
wicket/trunk/wicket-examples/src/test/java/org/apache/wicket/filtertest/Application.java
 (original)
+++ 
wicket/trunk/wicket-examples/src/test/java/org/apache/wicket/filtertest/Application.java
 Mon Mar 15 16:38:35 2010
@@ -40,7 +40,7 @@ public class Application extends WicketE
        {
                super.init();
 
-               getRootMapperAsCompound().add(new MountedMapper("/hello", 
HelloWorld.class));
+               getRootRequestMapperAsCompound().add(new 
MountedMapper("/hello", HelloWorld.class));
        }
 
        /**

Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java?rev=923333&r1=923332&r2=923333&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java 
(original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/Component.java Mon Mar 
15 16:38:35 2010
@@ -2315,6 +2315,7 @@ public abstract class Component implemen
                                                }
                                        }
                                }
+                               behavior.unbind(this);
                                return true;
                        }
                }

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/behavior/AbstractBehavior.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/behavior/AbstractBehavior.java?rev=923333&r1=923332&r2=923333&view=diff
==============================================================================
--- 
wicket/trunk/wicket/src/main/java/org/apache/wicket/behavior/AbstractBehavior.java
 (original)
+++ 
wicket/trunk/wicket/src/main/java/org/apache/wicket/behavior/AbstractBehavior.java
 Mon Mar 15 16:38:35 2010
@@ -155,4 +155,11 @@ public abstract class AbstractBehavior i
        {
                return false;
        }
+
+       /**
+        * @see 
org.apache.wicket.behavior.IBehavior#unbind(org.apache.wicket.Component)
+        */
+       public void unbind(Component component)
+       {
+       }
 }

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/behavior/IBehavior.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/behavior/IBehavior.java?rev=923333&r1=923332&r2=923333&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/behavior/IBehavior.java 
(original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/behavior/IBehavior.java 
Mon Mar 15 16:38:35 2010
@@ -80,6 +80,14 @@ public interface IBehavior extends IClus
        void bind(Component component);
 
        /**
+        * Notifies the behavior it is removed from the specified component
+        * 
+        * @param component
+        *            the component this behavior is unbound from
+        */
+       void unbind(Component component);
+
+       /**
         * Allows the behavior to detach any state it has attached during 
request processing.
         * 
         * @param component

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WebApplication.java?rev=923333&r1=923332&r2=923333&view=diff
==============================================================================
--- 
wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
 (original)
+++ 
wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
 Mon Mar 15 16:38:35 2010
@@ -288,7 +288,7 @@ public abstract class WebApplication ext
        public final void mount(IRequestMapper mapper)
        {
                Checks.argumentNotNull(mapper, "mapper");
-               getRootMapperAsCompound().add(mapper);
+               getRootRequestMapperAsCompound().add(mapper);
        }
 
        /**
@@ -297,7 +297,7 @@ public abstract class WebApplication ext
         * 
         * @return compound instance of the root mapper
         */
-       public ICompoundRequestMapper getRootMapperAsCompound()
+       public ICompoundRequestMapper getRootRequestMapperAsCompound()
        {
                IRequestMapper root = getRootRequestMapper();
                if (!(root instanceof ICompoundRequestMapper))


Reply via email to