You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by iv...@apache.org on 2012/01/17 23:52:32 UTC
[1/2] git commit: WICKET-4030
Updated Branches:
refs/heads/wicket-1.5.x ddb89f500 -> 2f521bda8
WICKET-4030
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/2f521bda
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/2f521bda
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/2f521bda
Branch: refs/heads/wicket-1.5.x
Commit: 2f521bda88b3a28e8989af2f373e49a8851aa5e0
Parents: 9573a74
Author: Igor Vaynberg <iv...@apache.org>
Authored: Tue Jan 17 14:52:23 2012 -0800
Committer: Igor Vaynberg <iv...@apache.org>
Committed: Tue Jan 17 14:52:23 2012 -0800
----------------------------------------------------------------------
.../src/main/java/org/apache/wicket/Component.java | 30 +++++++++++----
.../src/main/java/org/apache/wicket/Page.java | 18 ++++++---
2 files changed, 34 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/2f521bda/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 83c05a9..a35e99a 100644
--- a/wicket-core/src/main/java/org/apache/wicket/Component.java
+++ b/wicket-core/src/main/java/org/apache/wicket/Component.java
@@ -98,8 +98,8 @@ import org.slf4j.LoggerFactory;
* given Component is simply the 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
- * getPath(). To get a Component path relative to the page that contains it, you can
- * call getPageRelativePath().
+ * getPath(). To get a Component path relative to the page that contains it, you can call
+ * getPageRelativePath().
*
* <li><b>LifeCycle </b>- Components participate in the following lifecycle phases:
* <ul>
@@ -1090,11 +1090,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.
*
* @return True if an original destination was redirected to
@@ -3274,7 +3286,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).
@@ -3284,7 +3296,8 @@ public abstract class Component
* @param listener
* The listener interface that the URL should call
* @return The URL
- * @deprecated use {@link #urlFor(Behavior, RequestListenerInterface, PageParameters)} with explit parameters
+ * @deprecated use {@link #urlFor(Behavior, RequestListenerInterface, PageParameters)} with
+ * explit parameters
*/
@Deprecated
public final CharSequence urlFor(final Behavior behaviour,
@@ -3292,7 +3305,7 @@ public abstract class Component
{
return urlFor(behaviour, listener, null);
}
-
+
/**
* Gets a URL for the listener interface on a behavior (e.g. IBehaviorListener on
* AjaxPagingNavigationBehavior).
@@ -3337,7 +3350,7 @@ public abstract class Component
{
return getRequestCycle().urlFor(requestHandler);
}
-
+
/**
* Gets a URL for the listener interface (e.g. ILinkListener).
*
@@ -3346,13 +3359,14 @@ public abstract class Component
* @param listener
* The listener interface that the URL should call
* @return The URL
- * @deprecated use {@link #urlFor(RequestListenerInterface, PageParameters)} with explicit page parameters
+ * @deprecated use {@link #urlFor(RequestListenerInterface, PageParameters)} with explicit page
+ * parameters
*/
@Deprecated
public final CharSequence urlFor(final RequestListenerInterface listener)
{
return urlFor(listener, null);
- }
+ }
/**
* Gets a URL for the listener interface (e.g. ILinkListener).
http://git-wip-us.apache.org/repos/asf/wicket/blob/2f521bda/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 9910ec9..240070e 100644
--- a/wicket-core/src/main/java/org/apache/wicket/Page.java
+++ b/wicket-core/src/main/java/org/apache/wicket/Page.java
@@ -794,14 +794,12 @@ public abstract class Page extends MarkupContainer implements IRedirectListener,
});
}
- /**
- *
- * @see org.apache.wicket.Component#onBeforeRender()
- */
@Override
- protected void onBeforeRender()
+ void internalOnAfterConfigure()
{
- // first try to check if the page can be rendered:
+ super.internalOnAfterConfigure();
+
+ // check if the page can be rendered
if (!isActionAuthorized(RENDER))
{
if (log.isDebugEnabled())
@@ -810,7 +808,15 @@ public abstract class Page extends MarkupContainer implements IRedirectListener,
}
throw new UnauthorizedActionException(this, Component.RENDER);
}
+ }
+ /**
+ *
+ * @see org.apache.wicket.Component#onBeforeRender()
+ */
+ @Override
+ protected void onBeforeRender()
+ {
// Make sure it is really empty
renderedComponents = null;