You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Ann Baert (JIRA)" <ji...@apache.org> on 2008/09/01 14:10:44 UTC

[jira] Updated: (WICKET-1814) In IE6, a hash string is automatically appended to an ajax request

     [ https://issues.apache.org/jira/browse/WICKET-1814?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ann Baert updated WICKET-1814:
------------------------------

       Priority: Major  (was: Critical)
    Description: 
In IE6, a hash string is automatically appended to an ajax request if the page from which the ajax request originates, was invoked with that specific hash string.

For example, a page that contains an AjaxLink is requested with an hash string in the url (url + #topfocus). 

When the page is displayed, and the AjaxLink on that page is clicked (and the ajax request is sent to the server),
the request url invoked by xmlhttp still contains the hashstring, wich causes an error (404: Not found). 

I made a workaround  by adding an extra test in the WicketFilter, in method "getRelativePath(HttpServletRequest request)" to remove the hash string.

if (Boolean.valueOf(request.getHeader("wicket-ajax")).equals(Boolean.TRUE)) {
    int idx = path.indexOf("%23");
    if (idx > -1)  {
        path = path.substring(0, idx);
    }
}

Can this or another viable workaround be included within Wicket?

  was:
In IE6, a hash string is automatically appended to an ajax request if the page from which the ajax request originates, was invoked with that specific hash string.

For example, a page that contains an AjaxLink is requested with an hash string in the url (url + #topfocus). 

When the page is displayed, and the AjaxLink on that page is clicked (and the ajax request is sent to the server),
the request url invoked by xmlhttp still contains the hashstring, wich causes an error (404: Not found). 

I made a workaround  by adding an extra test in the WicketFilter, in method "getRelativePath(HttpServletRequest request)" to remove the hash string.

if (Boolean.valueOf(request.getHeader("wicket-ajax")).equals(Boolean.TRUE)) {
    int idx = path.indexOf("%23");
    if (idx > -1)  {
        path = path.substring(0, idx);
    }
}

Can this or another viable workaround be included within Wicket?



Example:
java:
public class AjaxTest extends WebPage {
    public AjaxTest() {
        add(new AjaxLink("link") {

            @Override
            public void onClick(AjaxRequestTarget target) {
                System.out.println("onclick");
            }
        });
    }
}

html:
<html>
  <head><title></title></head>
  <body><a wicket:id="link">link</a></body>
</html>


> In IE6, a hash string is automatically appended to an ajax request
> ------------------------------------------------------------------
>
>                 Key: WICKET-1814
>                 URL: https://issues.apache.org/jira/browse/WICKET-1814
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>         Environment: Internet explorer 6
>            Reporter: Ann Baert
>
> In IE6, a hash string is automatically appended to an ajax request if the page from which the ajax request originates, was invoked with that specific hash string.
> For example, a page that contains an AjaxLink is requested with an hash string in the url (url + #topfocus). 
> When the page is displayed, and the AjaxLink on that page is clicked (and the ajax request is sent to the server),
> the request url invoked by xmlhttp still contains the hashstring, wich causes an error (404: Not found). 
> I made a workaround  by adding an extra test in the WicketFilter, in method "getRelativePath(HttpServletRequest request)" to remove the hash string.
> if (Boolean.valueOf(request.getHeader("wicket-ajax")).equals(Boolean.TRUE)) {
>     int idx = path.indexOf("%23");
>     if (idx > -1)  {
>         path = path.substring(0, idx);
>     }
> }
> Can this or another viable workaround be included within Wicket?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.