Updated Branches:
  refs/heads/master 972f0dcc0 -> 2a17dd012

WICKET-4340


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

Branch: refs/heads/master
Commit: 2a17dd012be3ee6447fe7c884d59740cc072b5e9
Parents: 972f0dc
Author: Igor Vaynberg <[email protected]>
Authored: Tue Jan 17 13:50:40 2012 -0800
Committer: Igor Vaynberg <[email protected]>
Committed: Tue Jan 17 13:50:40 2012 -0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/wicket/Component.java |   27 ++++++++++----
 .../src/main/java/org/apache/wicket/Page.java      |   11 +++---
 2 files changed, 24 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/2a17dd01/wicket-core/src/main/java/org/apache/wicket/Component.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/Component.java 
b/wicket-core/src/main/java/org/apache/wicket/Component.java
index 9363760..ef9cc28 100644
--- a/wicket-core/src/main/java/org/apache/wicket/Component.java
+++ b/wicket-core/src/main/java/org/apache/wicket/Component.java
@@ -105,8 +105,7 @@ import org.slf4j.LoggerFactory;
  * concatenation with colon separators of each id along the way. For example, 
the path "a:b:c" would
  * refer to the component named "c" inside the MarkupContainer named "b" 
inside the container named
  * "a". The path to a component can be retrieved by calling {@link 
#getPath()}. To get a Component
- * path relative to the page that contains it, you can call {@link 
#getPageRelativePath()}.
- * </li>
+ * path relative to the page that contains it, you can call {@link 
#getPageRelativePath()}.</li>
  * <li><b>LifeCycle </b>- Components participate in the following lifecycle 
phases:
  * <ul>
  * <li><b>Construction </b>- A Component is constructed with the Java language 
new operator.
@@ -114,8 +113,7 @@ import org.slf4j.LoggerFactory;
  * {@link IComponentInstantiationListener}s are notified of component 
instantiation.
  * <p>
  * {@link #onInitialize()} is called on the component as soon as the component 
is part of a page's
- * component tree. At this state the component is able to access its markup.
- * </li>
+ * component tree. At this state the component is able to access its 
markup.</li>
  * <li><b>Request Handling </b>- An incoming request is processed by a 
protocol request handler such
  * as {@link WicketFilter}. An associated Application object creates {@link 
Session},
  * {@link Request} and {@link Response} objects for use by a given Component 
in updating its model
@@ -1088,11 +1086,23 @@ public abstract class Component
                        // check authorization
                        setRenderAllowed();
 
+                       internalOnAfterConfigure();
+
                        setRequestFlag(RFLAG_CONFIGURED, true);
                }
        }
 
        /**
+        * 
+        * THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT USE IT!
+        * 
+        * Called after the {@link #onConfigure()}, but before {@link 
#onBeforeRender()}
+        */
+       void internalOnAfterConfigure()
+       {
+       }
+
+       /**
         * Redirects to any intercept page previously specified by a call to 
redirectToInterceptPage.
         * The redirect is done by throwing an exception. If there is no 
intercept page no exception
         * will be thrown and the program flow will continue uninterrupted.
@@ -2680,10 +2690,11 @@ public abstract class Component
                                        // to be backward compatible. 
WICKET-3761
                                        
getMarkupSourcingStrategy().renderHead(this, container);
                                        CharSequence headerContribution = 
markupHeaderResponse.getBuffer();
-                                       if (Strings.isEmpty(headerContribution) 
== false) {
+                                       if (Strings.isEmpty(headerContribution) 
== false)
+                                       {
                                                
response.render(StringHeaderItem.forString(headerContribution));
                                        }
-                               } 
+                               }
                                finally
                                {
                                        
RequestCycle.get().setResponse(oldResponse);
@@ -3311,7 +3322,7 @@ public abstract class Component
        {
                return getRequestCycle().urlFor(pageClass, parameters);
        }
-       
+
        /**
         * Gets a URL for the listener interface on a behavior (e.g. 
IBehaviorListener on
         * AjaxPagingNavigationBehavior).
@@ -3356,7 +3367,7 @@ public abstract class Component
        {
                return getRequestCycle().urlFor(requestHandler);
        }
-       
+
        /**
         * Gets a URL for the listener interface (e.g. ILinkListener).
         * 

http://git-wip-us.apache.org/repos/asf/wicket/blob/2a17dd01/wicket-core/src/main/java/org/apache/wicket/Page.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/Page.java 
b/wicket-core/src/main/java/org/apache/wicket/Page.java
index 24845dd..4010104 100644
--- a/wicket-core/src/main/java/org/apache/wicket/Page.java
+++ b/wicket-core/src/main/java/org/apache/wicket/Page.java
@@ -300,8 +300,7 @@ public abstract class Page extends MarkupContainer 
implements IRedirectListener,
         * THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT CALL.
         * 
         * This method is called when a component was rendered standalone. If 
it is a <code>
-        * MarkupContainer</code>
-        * then the rendering for that container is checked.
+        * MarkupContainer</code> then the rendering for that container is 
checked.
         * 
         * @param component
         */
@@ -771,12 +770,12 @@ public abstract class Page extends MarkupContainer 
implements IRedirectListener,
        }
 
        @Override
-       protected void onConfigure()
+       void internalOnAfterConfigure()
        {
-               super.onConfigure();
+               super.internalOnAfterConfigure();
 
                // first try to check if the page can be rendered:
-               if (!isActionAuthorized(RENDER))
+               if (!isRenderAllowed())
                {
                        if (log.isDebugEnabled())
                        {
@@ -787,7 +786,7 @@ public abstract class Page extends MarkupContainer 
implements IRedirectListener,
        }
 
        /**
-        *
+        * 
         * @see org.apache.wicket.Component#onBeforeRender()
         */
        @Override

Reply via email to