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

When markup type is XML, getLocalizer().getString( "xyz", (WebPage) ) throws Exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3.4
    • 1.4-RC1
    • wicket
    • None
    • n/a

    Description

      When using

      @Override
      public String getMarkupType()

      { return "xml"; }

      in a webpage, I cannot use getLocalizer().getString( "xyz", this ) anymore. I traced it back to

      Caused by: org.xml.sax.SAXParseException: Document root element "order", must match DOCTYPE root "null".

      Apparently, the wicket localizer (org.apache.wicket.resource.loader.ComponentStringResourceLoader.loadStringResource, line 142) decides to look for an XML properties file. Normally, this would be ok. But now, since I have an XML file in place which is the markup for the webpage, localization breaks. Wicket thinks that my markup file is an XML properties file.

      Right now it's either XML markup and no localization for that page, or HTML markup.

      Attachments

        Activity

          People

            Unassigned Unassigned
            bgooren Sebastian Gooren
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: