/** * Returns request cycle associated with current thread. * * @return request cycle instance or <code>null</code> if no request cycle is associated with * current thread. */ public static RequestCycle get() { return ThreadContext.getRequestCycle(); }
/** * Returns request cycle associated with current thread. * * @return request cycle instance or <code>null</code> if no request cycle is associated with * current thread. */ public static RequestCycle get() { return ThreadContext.getRequestCycle(); }
public static void performRedirect(final String targetURL, final int statusCode) { ThreadContext.getRequestCycle().scheduleRequestHandlerAfterCurrent( new RedirectRequestHandler(targetURL, statusCode)); }
public static boolean isAjax() { RequestCycle requestCycle = ThreadContext.getRequestCycle(); return (requestCycle != null) ? ((WebRequest) requestCycle.getRequest()).isAjax() : false; }
public static HttpServletRequest getHttpServletRequest() { return (HttpServletRequest) ThreadContext.getRequestCycle().getRequest().getContainerRequest(); }
public static HttpServletResponse getHttpServletResponse() { return (HttpServletResponse) ThreadContext.getRequestCycle().getResponse().getContainerResponse(); }
final RequestCycle requestCycle = ThreadContext.getRequestCycle();
final RequestCycle requestCycle = ThreadContext.getRequestCycle();
/** * Sets the animation type for this marker. * * @param animation The animation which should be applied to this marker. * Pass NULL if you want to stop an ongoing animation. * * @see org.wicketstuff.gmap.api.GAnimation */ public void setAnimation(GAnimation animation) { Optional<AjaxRequestTarget> targetOptional = getRequestCycle().find(AjaxRequestTarget.class); targetOptional.ifPresent(target -> { options.setAnimation(animation); String animationToSet = null; if (animation != null) { animationToSet = animation.toString(); } target.appendJavaScript(getParent().getJsReference() + ".overlays['overlay" + getId() + "'].setAnimation("+animationToSet+")"); }); }
RequestCycle oldRequestCycle = ThreadContext.getRequestCycle();
RequestCycle oldRequestCycle = ThreadContext.getRequestCycle();
RequestCycle oldRequestCycle = ThreadContext.getRequestCycle();