Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-3023

Ajax does not work with XHTML

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.4.9
    • 1.4.18, 1.5-RC4
    • wicket
    • None

    Description

      Nothing except for plain AjaxLink works.

      // Page class
      @Override
      protected void configureResponse() {
      	super.configureResponse();
      	final Response response = getResponse();
      	response.setContentType("application/xhtml+xml");
      }
      

      Firebug says:

      An invalid or illegal string was specified" code: "12
      [Break on this error] c.innerHTML = msg; 
      

      Oh yes, no innerHTML is allowed in pure XHTML.

      A simple, quick work-around for this would be to use a jQuery and replace all innerHTMLs with something XHTML-friendly so that DOM tree is built. It would look something like that:

      // c.innerHTML = msg;
      $(c).html(msg);
      

      Attachments

        1. myproject3023.7z
          4 kB
          franta.mejta

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            nowaker Damian Nowak
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: