List of usage examples for org.apache.wicket.request IRequestHandler detach
default void detach(IRequestCycle requestCycle)
From source file:org.brixcms.Brix.java
License:Apache License
/** * Constructs a URL to the current page. This method can only be called within an active wicket request because it * relies on the {@link RequestCycle} threadlocal. * * @param params parameters to be encoded into the url * @return url to the current brix page/* w w w .j a v a 2s .c o m*/ * @throws BrixException if the current request was not for a brix page */ public static String urlForCurrentPage(BrixPageParameters params) { IRequestHandler target = new BrixNodeRequestHandler(getCurrentPage(), params); String url = RequestCycle.get().urlFor(target).toString(); target.detach(RequestCycle.get()); return url; }