Updated Branches: refs/heads/master a7f091974 -> 8cfcbdc0f
WICKET-4587 URLRenderer renderFullUrl Improve the javadoc of #mapUrlFor() methods Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/8cfcbdc0 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/8cfcbdc0 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/8cfcbdc0 Branch: refs/heads/master Commit: 8cfcbdc0f520de5c1c0b46afa88e4366008036f5 Parents: a7f0919 Author: Martin Tzvetanov Grigorov <[email protected]> Authored: Thu Oct 18 10:43:18 2012 +0200 Committer: Martin Tzvetanov Grigorov <[email protected]> Committed: Thu Oct 18 10:43:18 2012 +0200 ---------------------------------------------------------------------- .../apache/wicket/request/cycle/RequestCycle.java | 22 +++++++++++++-- 1 files changed, 19 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/wicket/blob/8cfcbdc0/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java ---------------------------------------------------------------------- diff --git a/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java b/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java index 1f57fe1..06e5b89 100644 --- a/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java +++ b/wicket-core/src/main/java/org/apache/wicket/request/cycle/RequestCycle.java @@ -394,8 +394,14 @@ public class RequestCycle implements IRequestCycle, IEventSink /** * Returns URL for the request handler or <code>null</code> if the handler couldn't have been * encoded. + * <p> + * <strong>Note</strong>: The produced URL is relative to the filter path. Application code + * most probably need URL relative to the currently used page, for this use + * {@linkplain #urlFor(org.apache.wicket.request.IRequestHandler)} + * </p> * * @param handler + * the {@link IRequestHandler request handler} for which to create a callback url * @return Url instance or <code>null</code> */ public Url mapUrlFor(IRequestHandler handler) @@ -407,7 +413,12 @@ public class RequestCycle implements IRequestCycle, IEventSink /** * Returns a {@link Url} for the resource reference - * + * <p> + * <strong>Note</strong>: The produced URL is relative to the filter path. Application code + * most probably need URL relative to the currently used page, for this use + * {@linkplain #urlFor(org.apache.wicket.request.resource.ResourceReference, org.apache.wicket.request.mapper.parameter.PageParameters)} + * </p> + * * @param reference * resource reference * @param params @@ -423,9 +434,14 @@ public class RequestCycle implements IRequestCycle, IEventSink * Returns a bookmarkable URL that references a given page class using a given set of page * parameters. Since the URL which is returned contains all information necessary to instantiate * and render the page, it can be stored in a user's browser as a stable bookmark. - * + * <p> + * <strong>Note</strong>: The produced URL is relative to the filter path. Application code + * most probably need URL relative to the currently used page, for this use + * {@linkplain #urlFor(Class, org.apache.wicket.request.mapper.parameter.PageParameters)} + * </p> + * * @param <C> - * + * The type of the page * @param pageClass * Class of page * @param parameters
