@Override public IRequestParameters getRequestParameters() { return wrappedRequest.getRequestParameters(); }
@Override public IRequestParameters getRequestParameters() { return wrappedRequest.getRequestParameters(); }
private int parseIntParameter(ServletWebRequest request, String name, int defaultValue) { StringValue param = request.getRequestParameters().getParameterValue(name); if (!param.isNull()) { try { return Integer.parseInt(param.toString()); } catch (NumberFormatException e) { log.warn("Value of parameter '" + name + "' is not an integer: '" + param + "', using default value '" + defaultValue + "'"); } } return defaultValue; }
/** * This method by default calls isAjax(), wicket ajax request do have an header set. And for all * the ajax request the versioning should be merged with the previous one. And when it sees that * the current request is a redirect to page request the version will also be merged with the * previous one because refresh in the browser or redirects to a page shouldn't generate a new * version. * * @see org.apache.wicket.Request#mergeVersion() */ public boolean mergeVersion() { RequestListenerInterface intface = getRequestParameters().getInterface(); return isAjax() || intface == IRedirectListener.INTERFACE; }
/** * Set the redirect url where wicket will redirect to for the next page * * @param wicketRedirectUrl */ public void setWicketRedirectUrl(String wicketRedirectUrl) { this.wicketRedirectUrl = wicketRedirectUrl; depthRelativeToWicketHandler = -1; relativePathPrefixToContextRoot = null; relativePathPrefixToWicketHandler = null; if (wicketRedirectUrl != null) { previousUrlDepth = getRequestParameters().getUrlDepth(); getRequestParameters().setUrlDepth(getDepthRelativeToWicketHandler()); } else { getRequestParameters().setUrlDepth(previousUrlDepth); getDepthRelativeToWicketHandler(); } }
/** * Set the redirect url where wicket will redirect to for the next page * * @param wicketRedirectUrl */ public void setWicketRedirectUrl(String wicketRedirectUrl) { this.wicketRedirectUrl = wicketRedirectUrl; depthRelativeToWicketHandler = -1; relativePathPrefixToContextRoot = null; relativePathPrefixToWicketHandler = null; if (wicketRedirectUrl != null) { previousUrlDepth = getRequestParameters().getUrlDepth(); getRequestParameters().setUrlDepth(getDepthRelativeToWicketHandler()); } else { getRequestParameters().setUrlDepth(previousUrlDepth); getDepthRelativeToWicketHandler(); } } }
/** * This method by default calls isAjax(), wicket ajax request do have an header set. And for all * the ajax request the versioning should be merged with the previous one. And when it sees that * the current request is a redirect to page request the version will also be merged with the * previous one because refresh in the browser or redirects to a page shouldn't generate a new * version. * * @see org.apache.wicket.Request#mergeVersion() */ @Override public boolean mergeVersion() { if (forceNewVersion == true) { return false; } else { RequestListenerInterface intface = getRequestParameters().getInterface(); return isAjax() || intface == IRedirectListener.INTERFACE; } }
/** * @see org.apache.wicket.protocol.http.WebRequest#newMultipartWebRequest(org.apache.wicket.util.lang.Bytes) */ @Override public WebRequest newMultipartWebRequest(Bytes maxsize) { try { MultipartServletWebRequest multipart = new MultipartServletWebRequest( httpServletRequest, maxsize); multipart.setRequestParameters(getRequestParameters()); return multipart; } catch (FileUploadException e) { throw new WicketRuntimeException(e); } }
for (int i = 0; i < getRequestParameters().getUrlDepth(); i++) int ajaxUrlDepth = isAjax() ? getRequestParameters().getUrlDepth() : -1; for (int i = 0; i < relativeUrl.length(); i++)
for (int i = 0; i < getRequestParameters().getUrlDepth(); i++) int ajaxUrlDepth = isAjax() ? getRequestParameters().getUrlDepth() : -1; for (int i = 0; i < relativeUrl.length(); i++)
int urlDepth = swr.getRequestParameters().getUrlDepth(); params.setUrlDepth(urlDepth > -1 ? urlDepth : swr.getDepthRelativeToWicketHandler());
int urlDepth = swr.getRequestParameters().getUrlDepth(); params.setUrlDepth(urlDepth > -1 ? urlDepth : swr.getDepthRelativeToWicketHandler());
base = getRequestParameters().getParameterValue(PARAM_AJAX_BASE_URL).toString(null);
base = getRequestParameters().getParameterValue(PARAM_AJAX_BASE_URL).toString(null);