SV: getRequestUrl behavior difference between page call and ajax call
- when loading the page from the browser, the URL is returned including the page parameters; Yes, that would be a GET-method request. - when updating through AJAX, the URL is returned without the page parameters. AAJAX requests are often POST-method. In POST requests the parameters are most often encoded in the body of the request. Shouldn't the AJAX call incorporate these page parameters such that the results are consistent? Not necessarily: the programmer normally picks up the parameters on the other side of the HTTPServletRequest which deals with such differences. However, you could see if there is a way to tell the AJAX library to use GET requests... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
getRequestUrl behavior difference between page call and ajax call
Hi, When calling (WebRequest)RequestCycle.get().getRequest()).getHttpServletRequest().getRequestURL() on a page with page parameters, I'm seeing different results: - when loading the page from the browser, the URL is returned including the page parameters; - when updating through AJAX, the URL is returned without the page parameters. Shouldn't the AJAX call incorporate these page parameters such that the results are consistent? What's your opinion on this? Thanks, Antoine. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: getRequestUrl behavior difference between page call and ajax call
by the way, this is the case for url coding strategies which use /par/ such as the default BookmarkablePageRequestTargetUrlCodingStrategy IMHO these parameters should be stripped but perhaps not in the getRequest method; any method available which does just this? On Wed, Jul 30, 2008 at 11:52 AM, Antoine van Wel [EMAIL PROTECTED] wrote: Hi, When calling (WebRequest)RequestCycle.get().getRequest()).getHttpServletRequest().getRequestURL() on a page with page parameters, I'm seeing different results: - when loading the page from the browser, the URL is returned including the page parameters; - when updating through AJAX, the URL is returned without the page parameters. Shouldn't the AJAX call incorporate these page parameters such that the results are consistent? What's your opinion on this? Thanks, Antoine. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]