/** * @param requestCycle * @return the configured encoding or the request's one as default */ private String getEncoding(final IRequestCycle requestCycle) { String encoding = this.encoding; if (Strings.isEmpty(encoding)) { Charset charset = requestCycle.getRequest().getCharset(); if (charset != null) { encoding = charset.name(); } } return encoding; }
/** * @param requestCycle * @return the configured encoding or the request's one as default */ private String getEncoding(final IRequestCycle requestCycle) { String encoding = this.encoding; if (Strings.isEmpty(encoding)) { Charset charset = requestCycle.getRequest().getCharset(); if (charset != null) { encoding = charset.name(); } } return encoding; }
private boolean shouldRedirectToPage(IRequestCycle requestCycle) { if (update.containsPage()) { return true; } if (((WebRequest)requestCycle.getRequest()).isAjax() == false) { // the request was not sent by wicket-ajax.js - this can happen when an Ajax request was // intercepted with #redirectToInterceptPage() and then the original request is re-sent // by the browser on a subsequent #continueToOriginalDestination() return true; } return false; }
private boolean shouldRedirectToPage(IRequestCycle requestCycle) { if (update.containsPage()) { return true; } if (((WebRequest)requestCycle.getRequest()).isAjax() == false) { // the request was not sent by wicket-ajax.js - this can happen when an Ajax request was // intercepted with #redirectToInterceptPage() and then the original request is re-sent // by the browser on a subsequent #continueToOriginalDestination() return true; } return false; }
/** * @see org.apache.wicket.request.IRequestHandler#respond(org.apache.wicket.request.IRequestCycle) */ @Override public void respond(final IRequestCycle requestCycle) { IResource.Attributes a = new IResource.Attributes(requestCycle.getRequest(), requestCycle.getResponse(), parameters); resource.respond(a); } }
/** * @see org.apache.wicket.request.IRequestHandler#respond(org.apache.wicket.request.IRequestCycle) */ @Override public void respond(final IRequestCycle requestCycle) { IResource.Attributes a = new IResource.Attributes(requestCycle.getRequest(), requestCycle.getResponse(), parameters); resource.respond(a); } }
@Override public void respond(IRequestCycle requestCycle) { XliffDownloadResource downloadResource = new XliffDownloadResource(resultAsMap, projectVersion, filter); downloadResource.respond(new IResource.Attributes(requestCycle.getRequest(), requestCycle.getResponse())); }
/** * Responds by sending the contents of the resource stream. * * @see org.apache.wicket.request.IRequestHandler#respond(org.apache.wicket.request.IRequestCycle) */ @Override public void respond(IRequestCycle requestCycle) { Attributes attributes = new Attributes(requestCycle.getRequest(), requestCycle.getResponse()); ResourceStreamResource resource = new ResourceStreamResource(resourceStream); configure(resource); resource.respond(attributes); }
/** * Responds by sending the contents of the resource stream. * * @see org.apache.wicket.request.IRequestHandler#respond(org.apache.wicket.request.IRequestCycle) */ @Override public void respond(IRequestCycle requestCycle) { Attributes attributes = new Attributes(requestCycle.getRequest(), requestCycle.getResponse()); ResourceStreamResource resource = new ResourceStreamResource(resourceStream); configure(resource); resource.respond(attributes); }
final HttpServletRequest r = (HttpServletRequest) requestCycle.getRequest().getContainerRequest(); String since = r.getHeader("If-Modified-Since"); if (!save && since != null) {
/** * @return the current session id for stateful pages and <code>null</code> for stateless pages * and non-http threads */ protected String getSessionId() { String sessionId = null; if (Application.exists() && RequestCycle.get() != null) { ISessionStore sessionStore = Application.get().getSessionStore(); IRequestCycle requestCycle = RequestCycle.get(); Session session = sessionStore.lookup(requestCycle.getRequest()); if (session != null) { sessionId = session.getId(); } } return sessionId; }
/** * @return the current session id for stateful pages and <code>null</code> for stateless pages * and non-http threads */ protected String getSessionId() { String sessionId = null; if (Application.exists() && RequestCycle.get() != null) { ISessionStore sessionStore = Application.get().getSessionStore(); IRequestCycle requestCycle = RequestCycle.get(); Session session = sessionStore.lookup(requestCycle.getRequest()); if (session != null) { sessionId = session.getId(); } } return sessionId; }
public void respond(IRequestCycle requestCycle) WebRequest wr = (WebRequest)requestCycle.getRequest();
final boolean isAjax = ((WebRequest)requestCycle.getRequest()).isAjax();
resource.setFileName(filename); resource.setContentDisposition(ContentDisposition.ATTACHMENT); IResource.Attributes a = new IResource.Attributes(requestCycle.getRequest(), requestCycle.getResponse()); resource.respond(a);
final boolean isAjax = ((WebRequest)requestCycle.getRequest()).isAjax();