Repository: wicket
Updated Branches:
  refs/heads/sandbox/component-queueing-2 5a4a77b9e -> 63d15c5c3


Formatting and typo fixes. No functional changes


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/63d15c5c
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/63d15c5c
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/63d15c5c

Branch: refs/heads/sandbox/component-queueing-2
Commit: 63d15c5c377c0e86b773178e834fb1e42e7878ad
Parents: 5a4a77b
Author: Martin Tzvetanov Grigorov <[email protected]>
Authored: Tue Feb 18 16:19:54 2014 +0200
Committer: Martin Tzvetanov Grigorov <[email protected]>
Committed: Tue Feb 18 16:19:54 2014 +0200

----------------------------------------------------------------------
 .../java/org/apache/wicket/MarkupContainer.java   | 12 ++++++------
 .../apache/wicket/markup/html/border/Border.java  |  9 ++++-----
 .../wicket/markup/repeater/AbstractRepeater.java  | 18 +++++++++++-------
 3 files changed, 21 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/63d15c5c/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java 
b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
index 3deb5ce..f6f0255 100644
--- a/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
+++ b/wicket-core/src/main/java/org/apache/wicket/MarkupContainer.java
@@ -1976,7 +1976,7 @@ public abstract class MarkupContainer extends Component 
implements Iterable<Comp
         * Queues a component to be dequeued later. The advantage of this 
method over the
         * {@link #add(Component...)} method is that the component does not 
have to be added to its
         * direct parent, only to a parent upstream; it will be dequeued into 
the correct parent using
-        * the hierarchy defined in the markup. This allows the component 
hiearchy to be maintined only
+        * the hierarchy defined in the markup. This allows the component 
hierarchy to be maintained only
         * in markup instead of in markup and in java code; affording designers 
and developers more
         * freedom when moving components in markup.
         * 
@@ -2064,14 +2064,14 @@ public abstract class MarkupContainer extends Component 
implements Iterable<Comp
         * Dequeues components. The default implementation iterates direct 
children of this container
         * found in the markup (retrieved via {@link #getDequeueMarkup()}) and 
tries to find matching
         * components in queues filled by a call to {@link 
#queue(Component...)}. It then delegates the
-        * dequeing to these children.
+        * dequeueing to these children.
         * 
         * The provided {@link DequeueContext} is used to maintain the place in 
markup as well as the
         * stack of components whose queues will be searched. For example, 
before delegating the call to
         * a child the container will push the child onto the stack of 
components.
         * 
         * Certain components that implement custom markup behaviors (such as 
repeaters and borders)
-        * override this method to bring dequeuing in line with their custom 
markup handling.
+        * override this method to bring dequeueing in line with their custom 
markup handling.
         * 
         * @param dequeue
         */
@@ -2151,7 +2151,7 @@ public abstract class MarkupContainer extends Component 
implements Iterable<Comp
        {
                if (tag instanceof WicketTag)
                {
-                       WicketTag wicketTag=(WicketTag)tag;
+                       WicketTag wicketTag = (WicketTag)tag;
                        if (wicketTag.getAutoComponentFactory() != null)
                        {
                                return true;
@@ -2163,7 +2163,7 @@ public abstract class MarkupContainer extends Component 
implements Iterable<Comp
                }
                return true;
        }
-       
+
        /**
         * Queries this container to find a child that can be dequeued that 
matches the specified tag.
         * The default implementation will check if there is a component in the 
queue that has the same
@@ -2179,7 +2179,7 @@ public abstract class MarkupContainer extends Component 
implements Iterable<Comp
        }
 
        /**
-        * Adds a dequeued component to this container. This method should 
rarely be overridden becase
+        * Adds a dequeued component to this container. This method should 
rarely be overridden because
         * the common case of simply forwarding the component to
         * {@link MarkupContainer#add(Component...))} method should cover most 
cases. Components that
         * implement a custom hierarchy, such as borders, may wish to override 
it to support edge-case

http://git-wip-us.apache.org/repos/asf/wicket/blob/63d15c5c/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
index 2d03277..057553c 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/border/Border.java
@@ -627,19 +627,18 @@ public abstract class Border extends WebMarkupContainer 
implements IComponentRes
                        return null;
                }
        }
-       
-       
+
        @Override
        protected boolean canDequeueTag(ComponentTag tag)
        {
-               if ((tag instanceof WicketTag)&&((WicketTag)tag).isBodyTag())
+               if ((tag instanceof WicketTag) && ((WicketTag)tag).isBodyTag())
                {
                        return true;
                }
 
                return super.canDequeueTag(tag);
        }
-       
+
        @Override
        public Component findComponentToDequeue(ComponentTag tag)
        {
@@ -649,7 +648,7 @@ public abstract class Border extends WebMarkupContainer 
implements IComponentRes
                }
                return super.findComponentToDequeue(tag);
        }
-       
+
        @Override
        protected void addDequeuedComponent(Component component, ComponentTag 
tag)
        {

http://git-wip-us.apache.org/repos/asf/wicket/blob/63d15c5c/wicket-core/src/main/java/org/apache/wicket/markup/repeater/AbstractRepeater.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/repeater/AbstractRepeater.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/repeater/AbstractRepeater.java
index 2b1a4bb..7b7bb4e 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/repeater/AbstractRepeater.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/repeater/AbstractRepeater.java
@@ -155,18 +155,22 @@ public abstract class AbstractRepeater extends 
WebMarkupContainer
        protected abstract void onPopulate();
        
        @Override
-       public void dequeue(DequeueContext dequeue) {
-               if (size()>0) {
+       public void dequeue(DequeueContext dequeue)
+       {
+               if (size() > 0)
+               {
                        // essentially what we do is for every child replace 
the repeater with the child in
                        // dequeue container stack and run the dequeue on the 
child. we also take care to reset
                        // the state of the dequeue context after we process 
every child.
 
-                       Bookmark bookmark=dequeue.save();
-                       
-                       for (Component child:this) {
-                               if (child instanceof MarkupContainer) {
+                       Bookmark bookmark = dequeue.save();
+
+                       for (Component child : this)
+                       {
+                               if (child instanceof MarkupContainer)
+                               {
                                        dequeue.popContainer(); // pop the 
repeater
-                                       MarkupContainer 
container=(MarkupContainer) child;
+                                       MarkupContainer container = 
(MarkupContainer) child;
                                        dequeue.pushContainer(container);
                                        container.dequeue(dequeue);
                                        dequeue.restore(bookmark);

Reply via email to